[tpm] Correction regarding my talk last night
ceeshek at gmail.com
Thu Oct 29 10:02:21 PDT 2015
Thanks for letting me speak on Mojolicious last night. Just a correction
on something I said last night. I received an email from Joel Berger who
watched the talks online today (Olaf and Dave, your efforts for getting the
TPM meetings online are not going to waste).
When I showed the example using the Delay object, I mentioned that you
could not guarantee the order in which your callbacks completed, and hence
the callback results that are sent to the next step were not guaranteed to
be in order. This was incorrect. The results are returned in the order in
which you started the callbacks.
The delay object knows which order the $delay->begin calls were made, and
even though the callbacks may finish in an unpredictable order, the delay
object ensures that the results as passed to the next step in the correct
Also, Joel mentioned that nesting delay objects also works correctly. This
is something that I wasn't sure if it was supported, but it is supported.
He provided the following example that shows this in action (inside one of
the steps of a delay object, he makes a call to a subroutine, and this
subroutine creates it's own delay object and uses it to make some non
If anyone is interested in looking further into the Non-Blocking support in
Mojo, Joel's blog series on the subject is highly recommended:
Writing Non-Blocking Applications with Mojolicious: Part 1
Writing Non-Blocking Applications with Mojolicious: Part 2
Writing Non-Blocking Applications with Mojolicious: Part 3
Non-blocking Mojolicious apps are even easier now!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm