-
Notifications
You must be signed in to change notification settings - Fork 3
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
Detach feature #9
Comments
The 'finish' proc (and all the other exit status procs) execute in the parent, not in the child. If the parent moves on, then we'd need to leave an extra thread waiting for child termination. Is the intent that the 'detach' call spawns a thread to perform the fork and wait for its result? It will certainly be hard to use properly - the waiting thread will need a Queue through which to communicate with the originating thread, and the child will be using a Pipe to send data to the waiting thread.. |
Yes, there should be a waiting thread. But better to keep it in reference object, like "IsoLatte::Process" for querying subprocess status. Example wouldn't work if "finish" will execute in child. |
Sorry, forgot that edits don't get emailed: IsoLatte is focused on solve the problem of isolation of execution - I wouldn't be averse to adding additional features that serve that purpose, but I'm not sure that adding an asynchronous execution system would really help with that - it's not a job queue. It sounds more like another gem that could be used alongside IsoLatte to me. Actually, it's a bit similar to what I ended up building in https://github.com/emcien/parenting originally, though that is still organized around waiting for the whole collection of tasks to complete. |
I'm going to close this for now - if you feel the capability is useful for isolation purposes, feel free to make your case here. Your implementation sounds fine, aside from being easy to misuse. |
Hello,
i propose to add "detach" feature, which should be only an option to existing interface.
The rationale for this feature is:
Usage example with rabbitmq:
In result i'll have worker supervisor, which able to handle upto 5 jobs simultaneously. Each job starts from scratch! no membloats! shitty jobs code protection!
The text was updated successfully, but these errors were encountered: