|
From: David Huggins-D. <dhu...@cs...> - 2006-05-03 14:26:21
|
Hi, I've been having terrible trouble making brokered audio connections work with threads. When I try to create a proxy from a separate thread, GalSS_ProxifyObjectType() blocks for an indeterminate amount of time, often several seconds. After tracing the code it appears that the problem lies in timed_tasks.c - the mutex protecting the task queue is only ever released for a very short amount of time, making it unlikely that the thread which is trying to add the proxy task will ever get scheduled. This problem is exacerbated by the fact that the hub thread is calling select() (which will sleep) while holding the mutex. This patch fixes the problem while maintaining thread safety: |