mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05:00
Update: Let the event stream run once a second even if no new event is there to process clients
This commit is contained in:
parent
11ae1e87df
commit
1c4ce97d6c
@ -183,6 +183,8 @@ void event_stream_add_client_inner(client_t *client, void *ud)
|
|||||||
event_stream_thread = thread_create("Event Stream Thread", event_stream_thread_function, (void *)NULL, THREAD_ATTACHED);
|
event_stream_thread = thread_create("Event Stream Thread", event_stream_thread_function, (void *)NULL, THREAD_ATTACHED);
|
||||||
}
|
}
|
||||||
thread_mutex_unlock(&event_stream_event_mutex);
|
thread_mutex_unlock(&event_stream_event_mutex);
|
||||||
|
|
||||||
|
thread_cond_broadcast(&event_stream_cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
void event_stream_add_client(client_t *client)
|
void event_stream_add_client(client_t *client)
|
||||||
@ -252,8 +254,7 @@ static void *event_stream_thread_function(void *arg)
|
|||||||
ICECAST_LOG_INFO("Good morning!");
|
ICECAST_LOG_INFO("Good morning!");
|
||||||
|
|
||||||
do {
|
do {
|
||||||
thread_cond_wait(&event_stream_cond);
|
thread_cond_timedwait(&event_stream_cond, 1000);
|
||||||
ICECAST_LOG_INFO("Tick!");
|
|
||||||
|
|
||||||
{
|
{
|
||||||
avl_tree_wlock(client_tree);
|
avl_tree_wlock(client_tree);
|
||||||
|
Loading…
Reference in New Issue
Block a user