[concurrency-interest] Fork and and timed get
martinrb at google.com
Thu Nov 21 02:35:28 EST 2013
Your message got ignored...
You created a pool with parallelism of 1, so it's not surprising that no
new thread was created to run action1. The action of the pool seems
reasonable to me - how would you do better?
Also, posting your code with a friendlier legal notice might help.
On Mon, Nov 18, 2013 at 8:35 AM, Jonathan Soto <jso at quartetfs.com> wrote:
> Hello everyone,
> It has been a few days I am thinking about this problem. Could you help me
> Suppose that we have two tasks
> - task1 waits for 5s
> - task2 forks task1 and does a timed get of 2.5 seconds
> The main thread submits task2 to a FJP.
> I observe the following behavior.
> - Thread Main :
> - Thread FJPO-1 : task1.fork
> As we are in the FJP it adds task1 into the workQueue of the current thread
> Task1 does not start in another thread
> - Thread FJPO-1 : task1.get(2.5, SECONDS)
> Starts by checking if the current thread has some local tasks to be done.
> As there is task1 that has been previously stored, we execute it.
> Task1 takes 5 seconds to be executed. The 2.5 seconds timeout is totally
> Is that the expected behavior ?
> P.s in attachment a unit test that prints FAIL when the test fails
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest