-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Currently this project uses the multitprocessing module and makes use of Process(), which are started using start().
Lines 352 to 353 in fbf988a
| self.p = Process(target=self.pwm_process, args=(self.gpio, self.sleep_high, self.sleep_low, self.precision), name='pwm_process') | |
| self.p.start() |
This does invoke one of the three different startmethods of multiprocessing implicitely.
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
Apparently one of the forking kind.
This leads to an incompatibility with curses, as screen properties are reset, when a (forked) child process exits.
Which means, everytime a PWM stop()s, curses screen does all sorts of stuff.
This project would not invoke such unwanted side effects, if started processes where spawned instead of forked.
In documentation a few lines below the above reference https://docs.python.org/3/library/multiprocessing.html#multiprocessing.set_start_method is documented.
@Leapo Would it be possible to use it instead of the implicit behavior?