On Nov 18, 2008, at 2:13 PM, Jeremy Evans wrote:

>
> On Nov 18, 9:36 am, None <[EMAIL PROTECTED]> wrote:
>>
>
>> Any ideas?  Anyone else out there need anything like this?
>
> Not really.  If you can spawn threads to deal with the database
> interactions, and just check those threads to see if they have
> completed (and get the data they return if they have), it might be
> possible to use Sequel in your nonblocking app.  Sequel shouldn't
> block the entire ruby interpreter unless the underlying database
> driver does (ruby-pg and postgres-pr do not, but ruby-mysql does).
> I'm not sure that is possible in ruby though, or if event machine
> allows it (and if it did, you could put any blocking code in it, not
> just Sequel).

In Eventmachine you would use EM::Deferrable for all of your Sequel  
calls. EM would handle spawning any ruby threads (green threads in  
MRI, native threads in JRuby). Then use #set_deferred_status in the  
Deferrable to notify your business logic when the Sequel calls have  
completed.

cr


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" 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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to