imace / jetlang

Automatically exported from code.google.com/p/jetlang
0 stars 0 forks source link

Allow clients to specify the ScheduledExecutorService used by PoolFiberFactory #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently PoolFiberFactory always creates its own ScheduledExecutorService
using Executors.newSingleThreadScheduledExecutor().

It would be nice if clients could pass their own ScheduledExecutorService
to the PoolFiberFactory constructor, so they can specify their own
scheduler configuration and thread factories etc.

In my case, I need my ScheduledExecutorService to periodically purge()
itself, to remove cancelled tasks that are using up memory. There is no way
to do this at the moment for tasks that are scheduled by PoolFibers.

Original issue reported on code.google.com by bene.nz on 12 May 2009 at 11:48

GoogleCodeExporter commented 9 years ago
I made the PoolFiber constructor public so you can write your own factory 
implementation and provide your own 
ScheduledExecutorService. This is checked into trunk.

Original comment by mike.ret...@gmail.com on 4 Jul 2009 at 12:05