-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TaskCancellation #7669
TaskCancellation #7669
Changes from 1 commit
169c540
682c5b5
2d020ba
1958e05
4fdeb5a
40b2bb5
d1295c3
269a3b1
028d9f7
a4b58e5
33ad6a1
4f7eec7
cc3ca28
bd47066
c0b5ab4
58c8bed
bae435f
9ab039d
d85496d
d0ba816
652a0fe
daac610
b050b28
b0457a3
18b3dbc
b813faf
112d7d8
ff8bbd3
af35898
b015c51
616f487
2361273
9dba915
9a43056
68a6458
46545e1
7308225
1f95492
9a0d120
82a6248
3270f92
794f146
e43ea33
9beea80
2a789f5
8c75a83
8f7bdfe
6f1ef56
f7fb69f
e8cd360
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,14 +559,13 @@ cdef void async_plasma_callback(CObjectID object_id, | |
event_handler._loop.call_soon_threadsafe( | ||
event_handler._complete_future, obj_id) | ||
|
||
cdef c_bool kill_main_task() nogil: | ||
cdef void kill_main_task() nogil: | ||
with gil: | ||
# This prevents this interrupt from being called to early. It may still | ||
# be called later, but will not cancel another task because this is | ||
# called with a C++ mutex lock. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if the interrupt gets delivered outside of the task execution handler's try-except block? Could that potentially crash the whole Python process? Also, I might be missing something, but I don't think this reasoning is correct about it being impossible to cancel another task. Looking at the cython source code, it seems that interrupt_main just calls There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might be able to address this by always calling |
||
if setproctitle.getproctitle() != "ray::IDLE": | ||
ijrsvt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
_thread.interrupt_main() | ||
return True | ||
|
||
|
||
cdef CRayStatus check_signals() nogil: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused about what "too early" means and why we need this check of the getproctitle. If this is holding the CoreWorker::mutex_, don't we know for sure that the Python process is currently executing the right task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is mostly incorrect at this point.