-
Notifications
You must be signed in to change notification settings - Fork 61
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
Create promise from handle #13
Comments
I am not sure I explained myself very well so I have submitted a pull request ( #14 )... I suspect it is not correct for merging... but something along those lines |
+1 although I'm not entirely clear why you don't want the child jobs to wait on the Specifically, I'm pulling in a bunch of data from a 3rd party API using a single fetch job. I have other calculation jobs that depend on that data. I want to start the fetch as soon as my user does the OAuth grant giving my app access, as it potentially takes a while. But I don't yet know the exact data ranges that user will want for the calculation, so the fetch job can't trigger the calculation jobs. Hence I want to start the fetch job, get a Alternatively, creating a |
I need to sort out a bunch of comments and some unit tests for this to go forward, there are no technical obstacles to the changes. I will try to get it done by Monday 11th May 2015. |
@billy1380 great, waiting to see your updates. @eschultink why don't you start the calculation job with and make it depends on a PromisedValue X. |
@aozarov Updates are now in, thanks for the patience. |
I have a generator task that creates a promise then spawns further generator tasks that rely on the same promise but there is no way to share that promised value with the child jobs. I cannot pass it as a job parameter because that will cause the children to wait for the promise.
I cannot also pass the promise and hold onto it when the child jobs are created because promised values are not serialisable.
Ideally I would like to be able to pass the child jobs a handle to the promise and then be able to convert that handle into a PromisedValue when I need it.
The text was updated successfully, but these errors were encountered: