-
-
Notifications
You must be signed in to change notification settings - Fork 76
Add dynamic scheduler control #117
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
Conversation
|
@shashi this is the foundation of what I was discussing with you in Slack today. Basically, we can expand this code to support modifying the DAG at execution time, with the scheduler support, of course. |
|
Bump. Any objections to the idea or implementation? |
|
Thanks for the review! I'll address your recommendations once I come back to this PR, and I also think I'll hold off on merging this until we expose a few more controls through this API, so that we can see what it will ultimately look like. I'd like to at least support adding new thunks to the DAG, and querying the scheduler state and the full DAG structure from this interface. |
3cd23c0 to
82f9810
Compare
|
Note to onlookers: locking was added to allow users to add their own |
|
I don't think I'm going to keep the |
ebdea68 to
a79b9e0
Compare
956ea72 to
dd2ec4b
Compare
308a0e5 to
27e7c86
Compare
5b2d3a9 to
0213ad3
Compare
Add exec! dynamic call to execute arbitrary code in the scheduler Add halt! function to stop scheduler early Add get_dag_ids function to query DAG Add add_thunk! function to add a new thunk to the DAG Add dynamic wait/fetch of other thunks Add safepointing to allow safely halting the scheduler Add locking to the scheduler to allow concurrent state modifications Fix start_state overwriting state.dependents Move scheduler into its own folder Create reschedule_inputs! utility Change check_exited_exception to unwrap_nested_exception Remove explicit chan passing in Sch, place it in ComputeState Add better error reporting to ThreadProc Set state.thunk_dict during Sch init
Allow thunks to dynamically control the scheduler
Todo:
exec!add_thunk!get_dag_idstask_local_storagefor scheduler handleadd_thunk!andwait/fetch!betterExpose scheduler control throughFor a future PRContextsomehowexec!set_return!towait/fetch, to allow one thunk to wait on another