job.cancel() returns true but job not cancelled
See original GitHub issueInformation
-
Qiskit IBMQ Provider version:
-
API URL or version:
-
Python version:
-
Operating system:
What is the current behavior?
job.cancel()
can return True
even if the cancel had failed.
Steps to reproduce the problem
It cannot be reproduced at will, but show up in several Travis runs (e.g. 1425 and 1414)
What is the expected behavior?
Job is cancelled if job.cancel()
returns true.
Suggested solutions
The provider currently checks for error
in the response data to determine if the cancel was successful. After talking to the api team, it should also be checking for 'cancelled': True
in the response data.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
What is the difference Job.Cancel vs Scope.Cancel in ...
In your first code block, your Job does not cooperate with cancellation. It has an infinite loop and does not call any suspend...
Read more >Cancellation and timeouts | Kotlin Documentation
The launch function returns a Job that can be used to cancel the ... and does not check for cancellation, then it cannot...
Read more >Cancellation in Kotlin Coroutines - Kt. Academy
Once a job is cancelled, it cannot be used as a parent for any new coroutines. It is first in the "Cancelling" and...
Read more >Job - javadoc.io
If the cause of cancellation is CancellationException, then the job is considered to be cancelled normally. This usually happens when Job.cancel is invoked ......
Read more >Jobs, Waiting, Cancellation in Kotlin Coroutines
It can be seen that the Log Statement is not allowed to execute until that coroutine which is running finishes its work and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
API rolled out a new release that had a job cancel related fix. This should be re-tested and see if we can close.
In some specific window
cancel()
may still fail even withcancelled: True
.