Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* RFC: env["async.sleep"] callback
@ 2009-12-08  9:06 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2009-12-08  9:06 UTC (permalink / raw)
  To: Rainbows! list

Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
> For the concurrency models that appear synchronous, you can check out
> t/sleep.ru in the test cases for sleep examples:
>   (case env['rainbows.model']
>   when :FiberPool, :FiberSpawn
>     Rainbows::Fiber
>   when :Revactor
>     Actor
>   else # :ThreadPool, :ThreadSpawn
>     Kernel
>   end).sleep(nr)
> I may put that logic into a env["async.sleep"] callback in places where
> env["async.callback"] is not available so the synchronous-looking
> concurrency models can all share the same code.

Does anybody have any more thoughts (for or against) on this issue?

Most of the "sleepy" apps I've seen are actually unavoidably sleepy
because they're waiting on an external API call, and not just because
the app feels like sleeping...

Eric Wong
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-08  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-08  9:06 RFC: env["async.sleep"] callback Eric Wong

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).