summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 149eea1)
raw | patch | inline | side by side (parent: 149eea1)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 20 Nov 2007 07:45:22 +0000 (08:45 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 20 Nov 2007 08:04:43 +0000 (09:04 +0100) |
Each END block is executed during perl_destruct() which happens once for each
ithread. As the number of ithreads are in no way related to any Perl plugins
this is not what we want. Now, each END block is only executed when the main
threads terminates (which happens after any other Perl thread has been shut
down).
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
ithread. As the number of ithreads are in no way related to any Perl plugins
this is not what we want. Now, each END block is only executed when the main
threads terminates (which happens after any other Perl thread has been shut
down).
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index cced76bbe4f156671068167f0e74dc6e06266846..d6371dbacffa4e06166e229fb06184d8e74130b8 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
static c_ithread_t *c_ithread_create (PerlInterpreter *base)
{
c_ithread_t *t = NULL;
+ dTHXa (NULL);
assert (NULL != perl_threads);
? NULL
: perl_clone (base, CLONEf_KEEP_PTR_TABLE);
+ aTHX = t->interp;
+
+ if (NULL != base) {
+ av_clear (PL_endav);
+ av_undef (PL_endav);
+ PL_endav = Nullav;
+ }
+
#if COLLECT_DEBUG
++perl_threads->number_of_threads;
#endif /* COLLECT_DEBUG */