HomePhabricator

[terminate] daemon thread approach

Authored by alangenfeld on Nov 12 2019, 5:32 PM.

Description

[terminate] daemon thread approach

Summary:
Alright.

So the previous approach of sending SIGINT for termination does not work on Windows. Here is a pretty good article that covers why https://stefan.sofa-rockers.org/2013/08/15/handling-sub-process-hierarchies-python-linux-os-x/

To address this we change the approach to using an Event and then a daemon thread that listens to it then interrupts the main thread if its tripped set.

Test Plan:
unit tests
azure pipeline against alangenfeld/windows
manually interrupt the sleepy pipeline on single and multi proc
manually interrupt the log spew on single and multi proc

Reviewers: #ft, prha

Reviewed By: #ft, prha

Subscribers: prha, themissinghlink

Differential Revision: https://dagster.phacility.com/D1398

Details

Committed
alangenfeldNov 12 2019, 5:32 PM
Reviewer
Restricted Project
Differential Revision
D1398: [terminate] daemon thread approach
Parents
R1:8dd9a238ab23: Update code referece in tutorial (#1900)
Branches
Unknown
Tags
Unknown