[e-lang] Blocking operation thread pool?
Kevin Reid
kpreid at mac.com
Sun Dec 7 20:59:36 CST 2008
My old EIO implementation for E-on-Java (kEIO) started a new vat for
each Java Stream or Reader it wrapped, so that it could block that vat
on IO. This is rather heavyweight.
How about having a pool of simple threads for performing blocking
operations? Then the cost would be just as many Java threads as there
are simultaneous blocks.
(This would not only be useful for EIO, but also for e.g. filesystem
operations (which can block due to network filesystems, seek time,
etc.) and for wrapping Java libraries designed to operate with
synchronous/blocking concurrency.)
I understand that the GHC Haskell runtime uses a mechanism much like
this.
Do you think this thread pool is a good idea?
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list