-
Notifications
You must be signed in to change notification settings - Fork 271
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Better documentation for timely::execute
#293
Comments
It should return almost immediately. It spawns several threads with the dataflow assembly instructions and then returns an instance of |
Aha, that was it, I was dropping the |
We use the `timely::execute` API to start the timely computation. This function used to be invoked in a separate thread, because I was under the impression that it does not return until the timely computation terminates. Turns out (TimelyDataflow/timely-dataflow#293), the function returns instantly, but it returns an instance of `WorkerGuards`, which, if dropped, blocks the current thread until the timely computation terminates. This patch gets rid of the extra thread and the associated ugliness and instead calls `execute` directly from `Program::run` and holds on to `WorkerGuards` until it is time to terminate the computation (in `RunningProgram::stop()`).
The documentation for
timely::execute()
does not specify when the function returns. The description says "Starts a timely dataflow execution...", and so I expected the function to return immediately after starting the worker threads. Experimentally, however, it seems to only return when the dataflow is terminating. Is this the intended behavior? If so, it should probably be documented.The text was updated successfully, but these errors were encountered: