Open boothby opened 6 years ago
Known undesirable behaviour, but thanks for reporting. The fix is planned (depends on another refactor).
The reason for this is we currently wait for future(s) to resolve (task queue empties) before joining. Instead we should catch Ctrl+C and kill all child workers.
I have seen similar behaviour when using the dwave ping
command on Linux.
When my account is out of credit, the client submits a problem and waits for a response, but the problem stays in the pending state until it is cancelled or more credit is available.
This results in the the process blocking the terminal session.
The ctrl+c
command won't stop the process from running.
As a workaround, I was able to find the process using ps aux | grep "dwave ping"
and stop it using the kill <pid>
command.
@davage, nice catch, we should look into handling out-of-quota scenarios.
Using dwave.system.samplers.DWaveSampler, I occasionally want to stop the process I'm running with a KeyboardInterrupt. This often takes upwards of 10 seconds... which seems a little excessive. Here's the traceback, when the interrupt finally gets caught.