dwave-hybrid
dwave-hybrid copied to clipboard
Should we allow a single Runnable instance to run multiple times concurrently?
Since Runnable.run()
is (via dispatch()
) offloading next()
to an executor, it's possible to run a single instance's next
multiple times in parallel.
This is not a problem if next()
does not mutate the self
, but it could potentially lead to a state lost, or even a deadlock if it does.
Should be categorically ban such a behaviour, or leave the responsibility to the block/workflow developer?