in reply to Re^2: How do I queue perl subroutines to a thread queue instead of data?
in thread How do I queue perl subroutines to a thread queue instead of data?

No Sorry! you still need to thread->create! Just make a thread that listens in the queue with the while (my $msg = $q->dequeue) { ... and it will wait until signalled. You can just use this to hold it up or you can check the contents of $msg and behave accordingly

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

Replies are listed 'Best First'.
Re^4: How do I queue perl subroutines to a thread queue instead of data?
by static0verdrive (Initiate) on Apr 25, 2013 at 15:14 UTC
    Understood - awesome, ty!! So I would want my threads->create() calls outside / just before the while loop in #main so they get created, but then inside the loop, based on when it's time to run, I queue them up! (right?) Tiny light bulb flickering on....