Commit cdaa26c8 authored by Max Kellermann's avatar Max Kellermann

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.
parent b1de50f9
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment