From cdaa26c81d692fefe5c9c2a4a01dcff633c99564 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:08 +0200 Subject: no busy-waiting for the player process The function player_command() inherited the busy-waiting algorithm from the old code; throw in a wait_main_task() to do idle waiting. --- src/player.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/player.c b/src/player.c index 8f3f6a6e6..08ad94096 100644 --- a/src/player.c +++ b/src/player.c @@ -97,9 +97,10 @@ static void set_current_song(Song *song) static void player_command(enum player_command cmd) { pc.command = cmd; - while (pc.command != PLAYER_COMMAND_NONE) - /* FIXME: _nb() variant is probably wrong here, and everywhere... */ + while (pc.command != PLAYER_COMMAND_NONE) { notify_signal(&pc.notify); + wait_main_task(); + } } void player_command_finished() -- cgit v1.2.3