projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af765ed
)
prohibit thread join()ing itself (from Dan Sugalski)
author
Gurusamy Sarathy
<gsar@cpan.org>
Wed, 7 Jul 1999 10:18:55 +0000
(10:18 +0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Wed, 7 Jul 1999 10:18:55 +0000
(10:18 +0000)
p4raw-id: //depot/perl@3645
ext/Thread/Thread.xs
patch
|
blob
|
history
diff --git
a/ext/Thread/Thread.xs
b/ext/Thread/Thread.xs
index
f8b544d
..
5d61941
100644
(file)
--- a/
ext/Thread/Thread.xs
+++ b/
ext/Thread/Thread.xs
@@
-353,6
+353,8
@@
join(t)
int i = NO_INIT
PPCODE:
#ifdef USE_THREADS
+ if (t == thr)
+ croak("Attempt to join self");
DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: joining %p (state %u)\n",
thr, t, ThrSTATE(t)););
MUTEX_LOCK(&t->mutex);