Ignore:
Timestamp:
Jun 26, 2007, 6:45:03 PM (14 years ago)
Author:
charles
Message:

Thread safety improvements. Also, stopping/starting/rechecking/etc. torrents no longer blocks the calling thread. Since this a big commit, it will probably create some short-term pain via new bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/platform.c

    r2197 r2202  
    201201{
    202202    tr_thread_t * t = _t;
     203    char* name = tr_strdup( t->name );
    203204
    204205#ifdef SYS_BEOS
     
    208209#endif
    209210
    210     tr_dbg( "Thread '%s' started", t->name );
     211    tr_dbg( "Thread '%s' started", name );
    211212    t->func( t->arg );
    212     tr_dbg( "Thread '%s' exited", t->name );
     213    tr_dbg( "Thread '%s' exited", name );
     214    tr_free( name );
    213215}
    214216
     
    242244#endif
    243245        tr_dbg( "Thread '%s' joined", t->name );
    244         free( t->name );
     246        tr_free( t->name );
    245247        t->name = NULL;
    246248        t->func = NULL;
     
    271273    #error how is this done in beos
    272274#else
     275    /* success on zero! */
    273276    return pthread_mutex_trylock( l );
    274277#endif
Note: See TracChangeset for help on using the changeset viewer.