Ignore:
Timestamp:
Feb 26, 2006 9:20:52 PM (18 years ago)
Author:
bennylp
Message:

Fixed bug pj_thread_register() when same thread is re-registered with different descriptor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_core_unix.c

    r150 r233  
    190190    /* If a thread descriptor has been registered before, just return it. */ 
    191191    if (pj_thread_local_get (thread_tls_id) != 0) { 
    192         *ptr_thread = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
    193         return PJ_SUCCESS; 
     192        // 2006-02-26 bennylp: 
     193        //  This wouldn't work in all cases!. 
     194        //  If thread is created by external module (e.g. sound thread), 
     195        //  thread may be reused while the pool used for the thread descriptor 
     196        //  has been deleted by application. 
     197        //*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id); 
     198        //return PJ_SUCCESS; 
    194199    } 
    195200 
Note: See TracChangeset for help on using the changeset viewer.