Added sub-instancing example.#15
Added sub-instancing example.#15GitMoDu wants to merge 5 commits intowizard97:masterfrom GitMoDu:master
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