[e-lang] Blocking operation thread pool?

Constantine Plotnikov constantine.plotnikov at gmail.com
Thu Feb 12 14:58:27 EST 2009


I think that there is no way around it anyway. BTW in AsyncObjects
(http://asyncobjects.sf.net) I have used thread pool created with the
following method for this purpose.

http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool(java.util.concurrent.ThreadFactory)

It was configured to use daemon threads. It worked rather well.

Constantine


On Mon, Dec 8, 2008 at 5:59 AM, Kevin Reid <kpreid at mac.com> wrote:
> 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/>
>
>
> _______________________________________________
> e-lang mailing list
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang
>


More information about the e-lang mailing list