in reply to Re: Configuration in threaded app
in thread Configuration in threaded app

What abount approach #1?

BTW: What's wrong with threads & signals?

Replies are listed 'Best First'.
Re^3: Configuration in threaded app
by Corion (Patriarch) on Aug 23, 2011 at 13:17 UTC

    Why would you want to keep on accessing a shared structure? This will essentially create a central locked data structure that will make all threads block when one thread reads from the configuration.

    Signal handling vastly varies between the thread implementations, from catastrophic failures to behaving like processes. I would avoid signals instead of finding out what behaviour is prevalent with your Perl and your OS and just implement in-band messages through Thread::Queue. There rarely is a reason to tell a thread "Stop whatever you're doing" where you can't just kill the thread and configure a fresh thread.