cyme.branch.thread
Raised if trying to start a thread instance that is already started.
alias of AlreadyStartedError
Raises exception in the current greenthread after timeout seconds.
When exception is omitted or None, the Timeout instance itself is raised. If seconds is None, the timer is not scheduled, and is only useful if you’re planning to raise it directly.
Timeout objects are context managers, and so can be used in with statements. When used in a with statement, if exception is False, the timeout is still raised, but the context manager suppresses it, so the code outside the with-block won’t see it.
If the timeout is pending, cancel it. If not using Timeouts in with statements, always call cancel() in a finally after the block of code that is getting timed out. If not canceled, the timeout will be raised later on, in some unexpected section of the application.
True if the timeout is scheduled to be raised.
Schedule the timeout. This is called on construction, so it should not be called explicitly, unless the timer has been canceled.
Call after the thread has shut down.
Greenlet instance of the thread, set when the thread is started.
Wait until the thread exits.
Parameters: | timeout – Timeout in seconds (int/float). |
---|---|
Raises eventlet.Timeout: | |
if the thread can’t be joined before the provided timeout. |
Set this to False if it is not possible to join the thread.
Kill the green thread.
Name of the thread, used in logs and such.
Set when the thread is requested to stop.
Spawn green thread, and returns GreenThread instance.
Apply function every interval seconds.
Parameters: |
|
---|---|
Returns: | entry object, with cancel and kill methods. |
Shutdown the thread.
This will also cancel+kill any periodic timers registered by the thread.
Parameters: |
---|