-
Notifications
You must be signed in to change notification settings - Fork 16
Added sub-instancing example. #15
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
base: master
Are you sure you want to change the base?
Conversation
|
Appreciate you following through and making an example. Looks mostly good, a few suggestions:
|
|
|
I think it would actually be pretty cool if you could think of an example where this "managing process" is actually a process itself. Maybe you make the manager process change the way the LEDS blink every 10 seconds or something? That would be pretty cool. |
Do you mean just overriding the cleanUp() method, or catching the ~Process() to remove the sub-processes from the scheduler? |
|
Definitely needs to be caught in cleanUp(). I actually realized calling cleanUp() on the child procs in the deconstructor isn't safe. As calling cleanUp() only queues the request to destroy a process. By the time the request actually gets processed the childprocs themselves will be out of scope since the deconstructor already would have run. |
…rocesses from the scheduler.
|
Updated with clean-up. |
|
Sorry, I completely missed your updates! Everything looks good, besides the cleanup of the child processes. I can't think of a way to do it that is clean and also safe. |
Discussion here: #14