[concurrency-interest] Future Get/Done Race Condition

David Holmes dcholmes at optusnet.com.au
Tue Jan 30 19:37:08 EST 2007


> Do you think the behavior could be classified as a bug, or subject to
> fixing/changing in the future?  You're right that it is subjective,
> but it does seem odd that the documentation suggests that 'done' can
> perform bookkeeping tasks, yet a get() call can return before the
> bookkeeping is performed.

The spec doesn't make it clear what order things happen so there is at least
room for a clarification. Changing the current behaviour is not an option,
but perhaps there could be some way to control it. It isn't uncommon for
"bookkeeping" tasks to occur asynchronously with respect to the main
behaviour - it all depends on whether that bookkeeping is independent of
that main behaviour, which in your case it is not. Noone else has raised
this issue to date so that says something :)

David Holmes

More information about the Concurrency-interest mailing list