[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re[2]: Coroutines and Go
- From: Bulat Ziganshin <bulat.ziganshin@...>
- Date: Thu, 12 Nov 2009 21:52:39 +0300
Hello David,
Thursday, November 12, 2009, 3:01:09 PM, you wrote:
>> We obviously don't need to be convinced about coroutines, but the idea
>> of moving blocked ones to another thread is intriguing.
> I'm a bit dubious about that concept.
> Unless it's doing something clever with asynchronous I/O, it'll need to
> allocate a new system thread for every blocked coroutine.
std implementation technique is that it looks like sync. call for
user, but internally it works via async calls (for example, epoll
queue). it is how it implemented in GHC (haskell), for example. they
have reported that web server written in Haskell was running thousand
of connections faster than Apache (used separate OS thread for every
connection at those time)
Writing High-Performance Server Applications in Haskell, Case Study:
A Haskell Web Server, http://www.haskell.org/~simonmar/papers/web-server.ps.gz
--
Best regards,
Bulat mailto:Bulat.Ziganshin@gmail.com