simpleflow icon indicating copy to clipboard operation
simpleflow copied to clipboard

Use concurrent.futures.Future

Open darkjh opened this issue 11 years ago • 0 comments

Per discussion with @ggreg , we notice that the semantic difference between our version of future (simpleflow.futures.Future) and python's future (concurrent.futures.Future) is mainly:

  1. behavior when blocking (access to result when computation is running)
  2. behavior of cancelling

However, these 2 points all come from the SWF executor. As we've separated backend executor (swf, local, local_async), these special future behavior should also be separated from the main interface.

It is proposed to:

  • introduce concurrent.futures.Future as the base Future definition.
  • could also be a sub-class of it to add behavior like map, see #7
  • created a SwfFuture that handles Swf specific cancelling and blocking strategy (blocking).

darkjh avatar Jul 21 '14 16:07 darkjh