Blocking operation thread pool?

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
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/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.