summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-08-26 23:53:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-08-26 23:53:33 +0000
commit7bb64a3359159ef4e8a61368a26cf573d8191ab8 (patch)
tree700dbf83642d10fb22f2e9e978016c20f6710512 /ext
parent6cdff4327458d0cb77a720c8b3a2b857195cc31c (diff)
downloadperl-7bb64a3359159ef4e8a61368a26cf573d8191ab8.tar.gz
new thread should set current interp in TLS
p4raw-id: //depot/perl@4032
Diffstat (limited to 'ext')
-rw-r--r--ext/Thread/Thread.xs8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs
index ad99e2c409..772d41a495 100644
--- a/ext/Thread/Thread.xs
+++ b/ext/Thread/Thread.xs
@@ -86,9 +86,14 @@ threadstart(void *arg)
I32 oldscope = PL_scopestack_ix;
I32 retval;
SV *sv;
- AV *av = newAV();
+ AV *av;
int i, ret;
dJMPENV;
+
+#if defined(MULTIPLICITY)
+ PERL_SET_INTERP(thr->interp);
+#endif
+
DEBUG_S(PerlIO_printf(PerlIO_stderr(), "new thread %p waiting to start\n",
thr));
@@ -114,6 +119,7 @@ threadstart(void *arg)
DEBUG_S(PerlIO_printf(PerlIO_stderr(), "new thread %p starting at %s\n",
thr, SvPEEK(TOPs)));
+ av = newAV();
sv = POPs;
PUTBACK;
ENTER;