Skip to content

Some more Future/ThreadingFuture changes#235

Closed
mpdetwiler wants to merge 9 commits intojodal:mainfrom
mpdetwiler:mpdetwiler/new-change-to-threading-future
Closed

Some more Future/ThreadingFuture changes#235
mpdetwiler wants to merge 9 commits intojodal:mainfrom
mpdetwiler:mpdetwiler/new-change-to-threading-future

Conversation

@mpdetwiler
Copy link
Copy Markdown

  • Based from 179883aaca6bb1745f570eef9ba939b60dcc2b6f.
  • Added is_completed() to check if the future has had one of it's set*() methods called.
  • If a _get_hook returns None, that will be considered the intended computed value and it will be cached into the _get_hook_result permanently.
  • Of the 3 methods set(), set_exception(), and set_get_hook(), only one can be called for a given future instance and at most once. Further calls will raise queue.Full.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants