in reply to how to make a module and its methods accessable between paren t and child threads
See http://search.cpan.org/~jdhedden/threads-shared-1.34/lib/threads/shared.pm#OBJECTS and http://cpansearch.perl.org/src/JDHEDDEN/threads-shared-1.34/examples/class.pl.
In general, I do not advise doing this. If you encounter the limitations of coding your application that way, feel free to come back and we can discuss alternative.
Basically this means putting threading within the object methods, rather than layering your objects across threads. I find this approach is easier to reason about, code and develop--and far more efficient--but it does require approaching your problem space from a different perspective.
|
|---|