On 01/16/2014 03:24 AM, Nacho B wrote:
Hi again, just before someone yells at me with the "No-blocking is not
magic", my point is that my test script depends from remote services or
machines that I can´t control.
It is not the case of a long and slow query to a database. If the queries
are the bottleneck and it is a permanent bottleneck, I understand that I
should try a different approach. It also happened to me using object
oriented event driven ActioScript architecture (waiting for infinite events
to come back are also a bottleneck itself).
But if it depends on a remote danger that can paralyze all my app, I think
that the "non-blocking" feature should be really a feature, somehow isn´t
it?
Am I too lost?
Just running things in Morbo doesn't make it magically non-blocking.
Since this same question seems to pop up on a more and more regular
basis, and honestly it's starting to get on my nerves a bit how often
people assume that merely using Mojo::IOLoop or running things under
Morbo or Hypnotoad make things non-blocking, this will also be the last
time I'm going to answer questions of this nature; Mojolicious boasts a
great many guides and manuals, and to be honest, "RTFM" would've been an
appropriate response to this question.
Your example also wasn't non-blocking. Here's a fixed test, gisted for
better readability: https://gist.github.com/benvanstaveren/8444038
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.