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.
This commit is contained in:
Max Kellermann 2008-08-26 08:27:08 +02:00
parent b1de50f994
commit cdaa26c81d

View File

@ -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()