diff options
Diffstat (limited to 'pjlib/src/pj/os_core_win32.c')
-rw-r--r-- | pjlib/src/pj/os_core_win32.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c index 94c438fe..a7aee215 100644 --- a/pjlib/src/pj/os_core_win32.c +++ b/pjlib/src/pj/os_core_win32.c @@ -202,8 +202,13 @@ PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name, /* If a thread descriptor has been registered before, just return it. */ if (pj_thread_local_get (thread_tls_id) != 0) { - *thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); - return PJ_SUCCESS; + // 2006-02-26 bennylp: + // This wouldn't work in all cases!. + // If thread is created by external module (e.g. sound thread), + // thread may be reused while the pool used for the thread descriptor + // has been deleted by application. + //*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); + //return PJ_SUCCESS; } /* Initialize and set the thread entry. */ |