in reply to Re^2: Data Between Threads
in thread Data Between Threads

On the threadA you are putting shift into $Qab. What is this doing? I am assuming it is to put the parameter into the sub's $Qab, but correct me if I am wrong.

Correct. A thread function is just a normal function that takes it arguments in the normal way.

Also what role does $Qab->enqueue( undef );

Once threadA has finished its loop; it queues undef before terminating. That undef causes the while loop in threadB to terminate; whence it then enqueues undef which cause the while loop in threadC to terminate.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.