Given a standard POE:C:JobQueue from CPAN:
our $workers = 16;
POE::Component::JobQueue->spawn
( Alias => 'passive', # defaults to 'queuer'
WorkerLimit => $workers, # defaults to 8
Worker => \&spawn_a_worker, # code which will start a se
+ssion
Passive =>
{ Prioritizer => sub { 1}, # defaults to sub { 1 } # FIFO
},
);
Is it possible to dynamically change how many workers are allowed to work?
If you set the variable workers to 16 at the start of the program, can you lower it halfway through?
I am looking at being able to dynamically increase how much work can actually happen given server load. If the server load is below a threshold, allow more work. Likewise, if the server load is to high, cut down how much work can be done.
Even smart people are dumb in most things...