On Mar 20, 2004, at 6:22 PM, Tom Insam wrote:
> I've been getting very weird and non-predictable behaviour when trying
According to its perldoc page, "use threads;" needs to be called as
early as possible, and can't be called from within an eval "", do,
require, or use. That might be causing problem, because main.pl is read
into a string and called with eval_pv() - essentially, the whole
program is being eval'd.
So I've made a slight change to CBPerl.m, so that if USE_ITHREADS is
#define'd, -Mthreads is passed as an argument to perl_parse(), with the
same effect as if it were passed on the command line. There's no way to
call it any earlier that I can see.
The change doesn't seem to have any negative effect on non-threaded
apps, so I've checked it in to the maint-0-2 branch. Could you have a
look at it, and see if it improves things at all for your threading
Also - keep in mind that AppKit isn't completely thread-safe. So, you
should only send messages to GUI elements from within the main thread.