| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a executor backed job dispatching base class
and has the existing blocking executor use it by running jobs
and dispatching jobs into a sync executor. It also allows
for dispatching jobs into a thread executor, or other executor
via a new '_executor_factory' method that can generate
executors (it can be overriden in the non-blocking executor
to provide your own executors instances).
This does alter the behavior in that now that jobs are dispatched
into an executor we no longer can immediatly know if a job was
dispatched and raised an exception or whether it will raise an
exception in the future, so we now alter the 'local_dispatched'
to just be a boolean that is used to determine if any dispatches
happened (failure or not).
Change-Id: I485770e8f4c85d3833892a453c9fb5168d8f0407
|
| |
|
|
| |
Change-Id: If89baa042695f19e42b6368034f3ccf22c2cf0aa
|
| |
|
|
|
|
|
|
| |
Fixes bug 1445827
Depends-On: I02e3c9aacef0b295a2f823a5cbaf11768a90cb82
Change-Id: I1db681803598ac1bc917fd74a99458bc61edf3f1
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of having later checks to check for
none when calling the thread bundle callback
just initially set it to a no-op functor that
does nothing at binding time instead; this avoids
the need to do repeated checks at start/stop
time.
Change-Id: I5ab4f801bf4767c802ea607fdf864d4852e6c84d
|
| |
|
|
|
|
|
|
|
|
| |
Instead of stopping in first started to last started
which is typically not desired (this is the starting
order) we should do the reverse and stop in last to
first instead (which is typically the expected
stopping order) by default.
Change-Id: Ic579438bc549d380c62c4d56c55c168de425adeb
|
| |
|
|
|
|
|
|
|
|
|
|
| |
To make it easier to create a bunch of threads in a single
call (and stop them in a single call) create a concept of
a thread bundle (similar to a thread group) that will call
into a provided set of factories to get a thread, activate
callbacks to notify others that a thread is about to start
or stop and then perform the start or stop of the bound
threads in a orderly manner.
Change-Id: I7d233cccb230b716af41243ad27220b988eec14c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we support various executors (threaded and distributed)
the next best executor when a threaded executor will not perform
and a distributed one requires to much setup is a local process
based one so it would be great to support this where we can.
Things that are currently (likely never) not going to work:
* Non-pickleable/non-copyable tasks
* Tasks that return non-pickleable/non-copyable results
* Tasks that use non-pickleable/non-copyable args/kwargs
Part of blueprint process-executor
Change-Id: I966ae01d390c7217b858db3feb2db949ce5c08d1
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of blocking up the whole test suite when a latch or
event was not decremented to its desired value (or not set for
an event) we should use a reasonably high value that we use
when waiting for those actions to occur and verify that when those
wait() functions return that we have reached the desired state and
if not either raise an exception or stop further testing.
Fixes bug 1363739
Change-Id: I8b40282ac2db9cabd48b0b65c8a2a49610d77c4f
|
| |
|
|
|
|
|
|
|
| |
With the new six version we can remove some
of the utility functions that we created now
that upstream six has equivalent or better
functionality.
Change-Id: I637fcf1475ca1af02608e736ca920c3e116c5529
|
| |
|
|
|
|
| |
This function seems better suited in the threading_utils module.
Change-Id: Iddd438b57973c7c6c26bd7b6239630656530bd1b
|
| |
|
|
| |
Change-Id: I8e678a9f76cba3d90053d28baf4ff42d34b4e390
|
| |
|
|
|
|
|
|
|
| |
Remove line containing
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
Change-Id: I7581cc88b8de433d5609ed06c6570b0b45c13573
Closes-Bug:#1229324
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch to using a reader/writer lock scheme to
protect against simultaneous storage mutations,
typically seen when running in a multi-threaded
mode.
For the single-threaded mode provide a dummy
reader/writer lock which will mimic the locking
api but not actually lock anything.
Closes-Bug: 1273146
Change-Id: I954f542d9ab34b693e8da71c9fc913f823e869ba
|
| |
|
|
|
|
|
|
| |
* Added missing period for doc strings
* Correct syntax errors
* Remove H402 from flake8 ignore list
Change-Id: Ia8592bf99378e3658d6cca2ceb148bf9eb0b5de8
|
| |
|
|
|
|
|
|
|
| |
Third party imports are supposed to be after standard library imports
so make six be after. Some newlines are also added to separate
standard library imports from all the others.
Co-authored-by: Ivan A. Melnikov <imelnikov@griddynamics.com>
Change-Id: Ied067e9367612758666da726df195ed390215e1b
|
| |
|
|
| |
Change-Id: Ifa3e7b820d594303c6c02eae12f55bce2bd1dacc
|
| |
|
|
| |
Change-Id: Ibf5dd6c0b6bcd161364daf35d618641f6079acf5
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In order to avoid the circular import
in threading utils move the decorators
functionality to utils/misc and move the
locking functionality to utils/lock_utils
and then use these functions from the
threading util (and elsewhere).
Fixes bug: 1236080
Change-Id: I9e71c2ba15782cbb6dd5ab7e1264b77ed47bc29e
|
| |
|
|
|
|
|
|
|
| |
Make the graph duplicate node names be
a post flatten function and add a bunch
of mostly useful comments to the various
utils functions/modules.
Change-Id: Iea7afc2f1b6e96a87da0aa2ca83dfbe4b76ee2db
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously to run a flow client code had to put together the flow,
an engine, logbook, flowdetail, and storage backend. This commit
adds two helper functions, run() and load(), so that simplest usecase
now looks like
taskflow.engines.run(flow)
Client code may also provide configuration for storage and engine if
needed, but if not needed it just works with defaults.
Engines are loaded via stevedore, as drivers in 'taskflow.engines'
backend. Now three entry points are defined in that namespace:
- 'default', for SingleThreadedActionEngine, used by default;
- 'serial', as another synonym for SingleThreadedActionEngine;
- 'parallel', for MultiThreadedActionEngine.
Closes-bug: #1224726
Change-Id: I7f4cb5c8ff7f5f12831ddd0952c202d2fd8cd6ef
|
| |
|
|
|
|
|
|
| |
Removing ThreadGroupExecutor allows to get rid of threading2
dependency. LastFedIter is also not used, so there is no
reason to keep it.
Change-Id: Id396ab59ebf1e2314ef620417d7cac09e1ab8d3b
|
| |
|
|
|
|
|
|
| |
MultiThreaded engine was implemented to execute tasks in parallel:
- added parallel action that executes and reverts tasks in parallel;
- added thread-safe storage.
Change-Id: I4a1f78c95ae5d38660bd32ce21d2b3fb1b2af8ad
|
|
|
In this commit we split utils module into several parts:
- flow_utils, with code used in running flows;
- threading_utils, with code that helps in working with threads;
- reflection, with code that inspects python objects metadata;
- misc, with all the other code that used to live in utils.py.
We also move graph_utils into taskflow.utils package.
This commit just moves code around. It should not change any logic (with
exception of complex_graph example).
Change-Id: Iebfe45395f0ff502bc00fc7ae14829130b2c6abe
|