[concurrency-interest] preFork() protected method in ForkJoinTask

Doug Lea dl at cs.oswego.edu
Wed Jan 19 06:59:06 EST 2011


> On Tue, Jan 18, 2011 at 3:55 AM, Antoine CHAMBILLE <ach at quartetfs.com>
> wrote:
>
>
> We have at least one use case for that: when some fork join tasks call
> legacy code that rely on thread local contexts it would be nice to
> subclass
> a fork join task that reads the thread local context ...

We do supply a different way to get this kind of effect, at
least sometimes: You can subclass ForkJoinWorkerThread and
supply a factory so that your threads are used in a given pool.
If these threads can be made to hold the needed, you are OK.

-Doug









More information about the Concurrency-interest mailing list