On Aug 30, 6:53 pm, oldmoe <[EMAIL PROTECTED]> wrote:
> > Ok, let me re-phrase that. Fibers are GREAT. "Just" sounds dismissive.
> > It's not. What I'm trying to say is that (again, as far as I know)
> > Neverblock is _not_ an implementation of asynchronous API for
> > Postgres. So it lets you run multiple connections concurrently. Good.
> > It still blocks. That thread stalls until the database finishes up
> > it's query execution. Just not the whole interpreter.
>
> The thread will not block, only the fiber issuing the IO will. And you
> can
> have many fibers living in the same thread at a much lower cost than
> spawning multiple threads in your application.
I guess I fundamentally just don't get Fibers. If the fiber blocks,
then it can't yield, so the thread is effectively blocked no?
I'm not claiming thread spawning is cheap, but same as database
connections, it's a non issue for the most part once you start
pooling. Plus they'll make better usage of the available resources.
> > I'm also not entirely sure that Fibers offer any advantages over a
> > ThreadPool based system in conjunction with Asynchronous database
> > drivers, so we'll probably stick to the ThreadPool solution once that
> > support is in since having more fibers than actual threads and/or open
> > connections obviously doesn't buy you a whole lot at the O/RM level
> > (though you're certainly free to take advantage of them at the
> > application level).
>
> I am sure some people would like a Fiber implementation as it is much
> easier
> than writing thread safe implementations. I am aware though that the
> project is
> limited on resources and must prioritize, hence I offer to implement
> the Fiber
> based pool myself, just drop me a line if you are interested
>
> regards
>
> Mohammad A. Ali
> oldmoe.blogspot.com
Appreciate the generous offer. I'm actually more curious about
figuring out what I'm missing regarding fibers. If a simple/prototype
pool is the best way to demonstrate that that's cool too.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---