mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 07:03:36 -04:00
pipeline: Display error if joining thread failed
This can occur if a thread tries to call join on itself
This commit is contained in:
parent
d6055cc927
commit
863a38e901
@ -169,7 +169,12 @@ join() {
|
|||||||
if (!_detached) {
|
if (!_detached) {
|
||||||
_mutex.unlock();
|
_mutex.unlock();
|
||||||
void *return_val;
|
void *return_val;
|
||||||
pthread_join(_thread, &return_val);
|
int result = pthread_join(_thread, &return_val);
|
||||||
|
if (result != 0) {
|
||||||
|
thread_cat.error()
|
||||||
|
<< "Failed to join thread " << _parent_obj->get_name()
|
||||||
|
<< ": " << strerror(result) << "\n";
|
||||||
|
}
|
||||||
_detached = true;
|
_detached = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user