FJP.CommonPool and VM shutdown (original) (raw)

Doug Lea dl at cs.oswego.edu
Tue Jan 1 08:55:59 PST 2013


On 01/01/13 11:42, Brian Goetz wrote:

OK, let me make sure I have this straight.

You used to only be able to call fork from a pool thread. To get to a pool thread, you had to do pool.invoke, which means a likely-non-daemon thread is waiting for the result. Now, someone can call invoke/fork from a non-pool thread, at which point it becomes temporarily coopted to be a limited pool thread.

Not really. It was always the case that if you wanted to wait out a submitted async FJ task from main() (to any FJP), you had to awaitTermination. Only those few people who do this (mainly Martin Buchholz and me, writing test code!) ever had to think about it. Now there is another uncommon case along these lines, with the implicit common pool, but it can now be programmed in exactly the same way.

-Doug



More information about the lambda-libs-spec-observers mailing list