summaryrefslogtreecommitdiff
path: root/taskflow/utils/async_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump futurist and remove waiting code in taskflowJoshua Harlow2015-07-251-88/+0
| | | | Change-Id: Ifc9780aa129a4a2804cead301a519895c2bfc0b5
* Integrate futurist (and **remove** taskflow originating code)Joshua Harlow2015-07-091-3/+6
| | | | Change-Id: If89baa042695f19e42b6368034f3ccf22c2cf0aa
* Use newer versions of futures that adds exception tracebacksJoshua Harlow2015-05-121-6/+3
| | | | | | Depends-On: I36f1241b983f6552d8bd0471e6a7485532a95a14 Change-Id: I49899019c4a1683bc6664cf0a52dcd5151b6e282
* Use importutils.try_import for optional eventlet importsJoshua Harlow2015-01-251-4/+2
| | | | | | | | | Instead of doing try: except ImportError for eventlet imports use the oslo.utils importutils.try_import function that safely does the same with less verbosity for the optional usage of eventlet imports/code that we have. Change-Id: I7eaa7c5908ffb04282892c9f6af04044b73f4f8c
* Add back a 'eventlet_utils' helper utility moduleJoshua Harlow2015-01-161-3/+4
| | | | | | | | | | | Recreate a very simple eventlet utility module that has only a few features; one function checks if eventlet is available and if not raise an exception; and a constant that can be used by calling code (such as tests or other optional functionality) to check if eventlet is useable before proceeding. Change-Id: I32df0702eeae7c7c78972c9796156dd824b2f123
* Return the same namedtuple that the future module returnsJoshua Harlow2014-12-211-15/+18
| | | | | | | | | | Instead of converting the namedtuple that the future wait function returns into a normal tuple, just have our own internal functions use the futures namedtuple directly instead and avoid any conversion to/from that namedtuple into a normal tuple. Change-Id: I54b2595af8d58db60843195034d66a623c20277c
* Add a futures type that can unify our future functionalityJoshua Harlow2014-10-181-11/+71
| | | | | | | | | | | | | | | | | Move the currently existing green future executor and associated code to a new futures types module so that it can be accessed from this new location (TODO: deprecate the old location and link the old to the new for one release so that we can remove the old link in N + 1 release). This unifies the API that the existing pool (thread or process) future executors and the green thread pool future executor, and the newly added synchronous executor (replacing the previous `make_completed_future` function) provide so there usage is as seamless as possible. Part of blueprint top-level-types Change-Id: Ie5500eaa7f4425edb604b2dd13a15f82909a673b
* Raise a runtime error when mixed green/non-green futuresJoshua Harlow2014-09-061-6/+15
| | | | | | | | To avoid the dead-lock scenario when green futures are being waited on in the same call as non-green futures just disallow this rare and unlikely scenario in the first place. Change-Id: I5b57f7aae94ae40d22047b0b085e4d99e034c2a6
* Use futures wait() when possibleJoshua Harlow2014-05-141-54/+7
| | | | | | | | | Instead of always using our custom future wait functionality, only use that functionality if there are green futures and in other cases just use the future wait() function instead. Change-Id: I1eadcf53eb4b5f47b9543965610bfe04fec52e70
* Remove extraneous vim configuration commentsyangxurong2014-02-141-2/+0
| | | | | | | | | Remove line containing comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4 Change-Id: I7581cc88b8de433d5609ed06c6570b0b45c13573 Closes-Bug:#1229324
* Instead of doing set diffing just partition when state checkingJoshua Harlow2014-02-121-8/+18
| | | | Change-Id: I1dff5b3ca5487c9318274f349e81af16b6c89015
* Doc strings and comments clean-upskudriashev2014-01-261-1/+1
| | | | | | | | * Added missing period for doc strings * Correct syntax errors * Remove H402 from flake8 ignore list Change-Id: Ia8592bf99378e3658d6cca2ceb148bf9eb0b5de8
* Add make_completed_future to async_utilsIvan A. Melnikov2013-12-251-1/+8
| | | | | | | Instead of keeping this three lines of code inside one of executors, we move them to special utility for farther re-use. Change-Id: I8f0ed76737fe29ad9492260cb84b66d09ec07f70
* Move async utils to own fileJoshua Harlow2013-12-201-0/+73
Instead of mixing eventlet related utility functionality with async utility functionality it seems to make sense to seperate those types into two different files. Change-Id: I8770fa5163feaa5f3666d36bf55d9aa30ca1b15f