Changeset a417ec82d9a793a2681be75be9be719e4972cfce

Show
Ignore:
Timestamp:
06/30/08 18:09:47 (2 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214842187 +0300
git-parent:

[17e4415c642051164b63dd27d65f7dc9c34ffd92]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1214842187 +0300
Message:

Warn in case of dangerous thread join patterns

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/objects.c

    rc2c6729 ra417ec8  
    302302    /* If we are running on a thread, wait until it ends */ 
    303303    if( p_priv->b_thread ) 
     304    { 
     305        msg_Warn (p_this->p_libvlc, /* do NOT use a dead object for logging! */ 
     306                  "object %d destroyed while thread alive (VLC might crash)", 
     307                  p_this->i_object_id); 
    304308        vlc_thread_join( p_this ); 
     309    } 
    305310 
    306311    /* Call the custom "subclass" destructor */ 
  • src/misc/threads.c

    rf8fbd68 ra417ec8  
    696696     * from the joined thread */ 
    697697    if (pthread_equal (pthread_self (), p_priv->thread_id)) 
     698    { 
     699        msg_Warn (p_this, "joining the active thread (VLC might crash)"); 
    698700        i_ret = pthread_detach (p_priv->thread_id); 
     701    } 
    699702    else 
    700703        i_ret = pthread_join (p_priv->thread_id, NULL);