|We don't bite newbies here... much|
POE::Component::JobQueue, getting current worker numberby Devanchya (Beadle)
|on Jan 18, 2013 at 04:03 UTC||Need Help??|
Devanchya has asked for the
wisdom of the Perl Monks concerning the following question:
I've written an extensive POE::Component::JobQueue which is used to get around a long running Singleton process.
I've figured out how to load multiple copies of the Singleton into the application, however I need to ensure that only a copy of the Singleton that is not being used is referenced.
The easiest way to do this would be to simply refer to the worker_count reference of the JobQueue process as shown in the internals. IE: JobQueue #1 would reference to the #1 singleton... #8 would reference to the #8 reference of the singleton.
However using a Passive JobQueue with standard FIFO, which then runs a session which calls the Singleton through a Wheel::Run process, I can not figure out how to access what is the current wheel_count.
Checking a dump of the Kernel for the POE, shows the data is deeply embeded, but not directly accessible. Direct Access to the current Heap or Session does not lead to access.
Is there a way to get the current worker_count for a Passive JobQueue?(Sorry for no code samples, the code is not accessible on the Intranet)
Even smart people are dumb in most things...