labscript-suite-temp / blacs

BLACS, part of the labscript suite, provides an interface to hardware used to control a buffered experiment. It manages a queue of shots to be run as well as providing manual control over devices between shots.
Other
0 stars 0 forks source link

Graceful Worker Process exit on restart #31

Open philipstarkey opened 6 years ago

philipstarkey commented 6 years ago

Original report (archived issue) by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


Currently if one restarts a Tab the worker process is immediately terminated. This can leave things in a bad state. In particular I've been having problems with locks not being released. It would be nice if there was a attempt to call the shutdown() function of the workers before terminating them.

I already tried to implement this on a per worker basis with python's signal library, but under windows there is no signal.SIGTERM so that didn't work.

philipstarkey commented 6 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: pstarkey).


It should be possible to do this in zprocess I think. I recently did some work on another project (autoscrub) which relies on managing and killing subprocesses (although not necessarily killing them cleanly).

Things that I've found include:

Anyway, I would suggest we turn this into a zprocess issue as I think it can probably be mainly solved on that side, and then we can update BLACS to use the improved zprocess API.

philipstarkey commented 6 years ago

Original comment by Jan Werkmann (Bitbucket: PhyNerd, GitHub: PhyNerd).


Your probably right that solving this in zprocess is a better solution. I'll open a issue there. I think we should keep this issue open anyway as others might run into the same problems I had.