summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-11-07 18:24:16 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2015-11-13 20:55:47 -0500
commit05ce4782bb9cfe025a5aaaf6d69a51c944dba934 (patch)
tree0a6c774d99a9bbb9f0e39fc101b0cb70ac728538
parent692d57e3cb596d324ab977c33e4be0bb997f6e6f (diff)
downloadperl-05ce4782bb9cfe025a5aaaf6d69a51c944dba934.tar.gz
Some more threads.xs comments, courtesy jhedden
-rw-r--r--dist/threads/threads.xs4
1 files changed, 4 insertions, 0 deletions
diff --git a/dist/threads/threads.xs b/dist/threads/threads.xs
index 535d5ac6df..366877eb09 100644
--- a/dist/threads/threads.xs
+++ b/dist/threads/threads.xs
@@ -750,6 +750,8 @@ S_ithread_create(
}
PERL_SET_CONTEXT(aTHX);
if (!thread) {
+ /* This lock was acquired in ithread_create()
+ * prior to calling S_ithread_create(). */
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
{
int fd = PerlIO_fileno(Perl_error_log);
@@ -991,6 +993,8 @@ S_ithread_create(
if (rc_stack_size || rc_thread_create) {
#endif
/* Must unlock mutex for destruct call */
+ /* This lock was acquired in ithread_create()
+ * prior to calling S_ithread_create(). */
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
thread->state |= PERL_ITHR_NONVIABLE;
S_ithread_free(aTHX_ thread); /* Releases MUTEX */