Hello, I am experimenting here and I am curious about something.
Is it possible to share a variable using threads::shared between perl interpreter threads in mod_perl? These being the interpreters started when a parent starts. Eg: use threads::shared; my $sharedVar = "bleh"; sub handler : method { ... } Now, I know if I go ahead and create threads in the handler method or even a pool of global worker threads, $sharedVar is shared between the threads created. But what of the other threads that are started and sitting in the pool of interps that mod_perl creates upon startup? How can I share a variable between all of the interpreter threads? What about locking or use of semaphores or signals? Maybe I am missing something, perhaps it's not possible. I am hoping to use an in house class in mod_perl2 that maintains it's own threads for performing tasks. The problem is one task has to be synchronized between all threads in a whole process. Works fine under perl alone, problems arise under mod_perl+worker_mpm tho. Thanks, -- Richard F. Rebel [EMAIL PROTECTED] t. 212.239.0000
signature.asc
Description: This is a digitally signed message part