[Chicago-talk] Fw: What problems do threads solve for you and how could your languagemake it easier
michael at potter.name
Tue Nov 2 09:58:16 PDT 2010
Here is how I would use parallel features in Perl....
# do some long running thing here.
# do another long running thing (perhaps a db query)
Keeps it simple.
myfunc1() and myfunc2() run in parallel.
When the both finish runthese() returns.
runthese() should be able to be called from within a function that was
invoked with runthese().
runthese should return an array of the return codes from the myfuncN().
runthese should be able to take any reasonable number of arguments, or
perhaps an array of function pointers.
Some scheme should be developed such that the functions can read from the
same file or socket with some guarantee that they will not read the same
data. Perhaps a specifier on a function that would tell perl to only allow
one instance of that function to run at a time.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chicago-talk