>
> So... what can be done about it? Perhaps a reading list to say if you're
> gonna go down this path, read these things, and understand this stuff
> first. Ben and sri, how can I know what you guys know?? What did you
> read? Where did you go to school? What project code should I be looking
> at?
>
Oh, how i wish it was that simple... i got my non-blocking mojo (haha!)
from actually implementing event loops... and it took me quite a while of
looking like a fool to really grok it.
The simplest implementation i know of is actually the fallback event loop
in Mojolicious. If you understand that module i'm pretty sure you
understand non-blocking.
https://github.com/kraih/mojo/blob/master/lib/Mojo/Reactor/Poll.pm
I've been desperately looking for a good tutorial to point people at, but
without much success so far.
> So, my question was how to make a M::UA that exists for web sites but make
> one that exists for databases, and for connecting to an NTP server, and for
> connecting to any old random socket or process? I could really use Ben and
> sri's brain, here, to help me understand why this isn't possible / doesn't
> make sense if that is indeed the case. The database is on another process
> doing things. Why can't Mojolicious say, hey -- take your time (but not
> too long) and then get back to me when you're done -- just like what M::UA
> does for websites? Instead, it connects to the database and says, I'm not
> leaving until you give me an answer!!
>
Well, i guess then i have no choice but to answer. :)
It's all about the underlying syscalls, here's a pretty decent explanation
i just found.
http://www.sal.ksu.edu/faculty/tim/ossg/Device/blocking.html
Most DBI drivers for example made the choice to use blocking syscalls, and
we can't change that from the outside. (There are certain hacks, but they
all have their drawbacks)
--
sebastian
--
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.