in reply to Re^5: Perl crash during perl_clone
in thread Perl crash during perl_clone
However, I got thinking about what you mean by the 'right' interpreter..if I have two interpreters then it is not clear what is the 'right' interpreter. Can you elaborate which you think is the right interpreter?
Then I decided to question the premise/info under which I went to the cloning method and did an experiment: I removed the perl_clone completely (and the related SvSHARE, sv_dup etc). Instead, when my "BGThread-equivalent" is created, I just forced a PERL_SET_CONTEXT() to the interpreter created by perl.exe
This forces the callback thread to invoke the perl sub in the same interpreter context as that created by perl.exe itself.
In my limited tests, very surprisngly for me, so far that seems to work as well as the perl_clone approach I used for almost a yr now.
I'll be testing more, but does this surprise you?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Perl crash during perl_clone
by BrowserUk (Patriarch) on Oct 28, 2010 at 12:31 UTC | |
by perlmonk1729 (Acolyte) on Oct 28, 2010 at 17:52 UTC | |
by BrowserUk (Patriarch) on Oct 29, 2010 at 00:19 UTC | |
by perlmonk1729 (Acolyte) on Oct 29, 2010 at 09:28 UTC | |
by BrowserUk (Patriarch) on Oct 29, 2010 at 11:57 UTC | |
|