in reply to Re: Perl crash during perl_clone
in thread Perl crash during perl_clone
Yes, I meant to put a link to the old post but missed it. Thx for finding it yourself! That code is still quite valid. I also did not realize that others did not get notification of my replies.
Reg "you are attempting to call a coderef (callback)--in an interpreter/thread that you spawned yourself from within C--that was passed into your C code from another interpreter/thread spawned by Perl."
I think you got the gist of my approach, except that the the coderef was passed into C code from Perl's "default" interpreter (the instance created automatically when I run perl.exe) & NOT from another interpreter/thread spawned by Perl (not sure the difference matters).
I found this approach from perlembed, other posts and online references. It seems others had it working similarly.
I'll try to package the sample code as downloadable. However, CPAN packaging is new to me so need to research it.
When this problem occurs, there are only two "threads" of execution..perl.exe's interpreter and the 2nd interpreter/thread I creaetd. Anyway, I'm open to trying any hunches..so, will try this as well.
I wondered if the crash could be due to perl's "default" interpreter changing data structures while the cloning (perl_clone) is still executing. I was planning to explore 'blocking' the default interpreter until the perl_clone is complete.
Appreciate your time/comments very much!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl crash during perl_clone
by BrowserUk (Patriarch) on Oct 27, 2010 at 11:57 UTC | |
by perlmonk1729 (Acolyte) on Oct 28, 2010 at 06:01 UTC | |
by BrowserUk (Patriarch) on Oct 28, 2010 at 08:23 UTC | |
by perlmonk1729 (Acolyte) on Oct 28, 2010 at 11:31 UTC | |
by BrowserUk (Patriarch) on Oct 28, 2010 at 12:31 UTC | |
|