In the documentation of JobQueue
The example shows a one parameter constructor while actually its a two parameter method.
You are right. Once changed there is also the issue that the sample with threading as parallelisation method doesn't work because threads don't have an exitcode.
I am completely new to the internals of fabric but shouldn't a try/catch block within the WrappedCallableTask (or Task for that matter) class solve this so that we get an exit code depending on if an exception was thrown during the task execution or not?
Or is threading at this point not really a use-case anymore?
Additionally, would it make sense to move this whole sample code into a bunch of unittests?
The example is still wrong in 1.9.2.
# Make a job_queue with a bubble of len 5, and have it print verbosely
jobs = JobQueue(5)
jobs._debug = True
[#1305] Add queue for try_using examples
[#1305] Only alter the exit_code if job is a Process
- Addresses this comment on issue:
- no status code to set for Threads anyway
- only processes used in fabric internals
Changelog, fixes #1305, fixes #1313