Comments (4)
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..
from iso_latte.
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.
from iso_latte.
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.
from iso_latte.
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.
from iso_latte.
Related Issues (10)
- Timeout would be nice too! HOT 3
- where is `ensure` ? HOT 3
- Improve timeout functionality
- Set up travis for testing HOT 1
- Check for compatibility with other rubies HOT 1
- Timeout and waitpid should be in side-threads
- Allow the fork to Marshal a result back over a pipe
- `Exception#cause`: problem with exception propagation
- How to load environment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iso_latte.