Changeset a417ec82d9a793a2681be75be9be719e4972cfce
- 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
| rc2c6729 |
ra417ec8 |
|
| 302 | 302 | /* If we are running on a thread, wait until it ends */ |
|---|
| 303 | 303 | 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); |
|---|
| 304 | 308 | vlc_thread_join( p_this ); |
|---|
| | 309 | } |
|---|
| 305 | 310 | |
|---|
| 306 | 311 | /* Call the custom "subclass" destructor */ |
|---|
| rf8fbd68 |
ra417ec8 |
|
| 696 | 696 | * from the joined thread */ |
|---|
| 697 | 697 | if (pthread_equal (pthread_self (), p_priv->thread_id)) |
|---|
| | 698 | { |
|---|
| | 699 | msg_Warn (p_this, "joining the active thread (VLC might crash)"); |
|---|
| 698 | 700 | i_ret = pthread_detach (p_priv->thread_id); |
|---|
| | 701 | } |
|---|
| 699 | 702 | else |
|---|
| 700 | 703 | i_ret = pthread_join (p_priv->thread_id, NULL); |
|---|