Re: Creating a thread pool within a callback cause segfault
[email protected] (Gensky Regnus) Sat, 24 Jan 2004 10:29:12 -0500
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
Looks like the problem is with creating threads within the event
callback. This snippet of code segfaults.
#!perl
use threads;
use threads::shared;
use Event;
$Event::DebugLevel = 5;
my $var : shared;
my $timer = Event->timer(
desc => 'thread_test',
interval => 1,
cb => sub {
async {$var++}
}
);
Event::loop;