Wrappers for the background task callable and the foreground future.
These are used by the TraitsExecutor machinery.
Wrapper for the IFuture.
Passes on messages received for this future.
Bool recording whether the future has completed or not. The executor listens to this trait to decide when it can clean up its own internal state.
The Traits Futures future being wrapped
Object that receives messages from the background task.
run_background_task(task, sender, cancelled)[source]¶
Wrapper for callables submitted to the underlying executor.
task – Callable representing the background task. This will be called with arguments
IMessageSender) – Object used to send messages.
cancelled – Zero-argument callable returning bool. This can be called to check whether cancellation has been requested.