-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add threads for alias and output updates on startup #214
base: master
Are you sure you want to change the base?
Conversation
How thread-safe is Sisyphus? There is no potential issue with that? |
Since this is just alias and output updates I dont think there is a problem. These ops should be executable any time |
I'm more thinking about all the internal caching mechanisms of jobs, outputs, paths, the graph, etc. All of that must be thread-safe. (But it might be already, as we also use multi-threading elsewhere. I don't recall the details now.) |
While my impression is they are, I am passing the question to the experts since I dont know for sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any problem running create_aliases
in a separate thread, but check_output might be problematic. If it slows down the startup to much you could consider removing it here. It will be called again inside the manager loop anyway.
That should be tested, but I think that's less dangerous than running it in an extra thread.
Side note: It would be nicer to use the already existing manager thread_pool instead of starting new threads.
I updated to use the thread pool.
While that is true, its called with other parameters right? So a "full" update is only done at the beginning. I dont mind removing it here and then saying "user needs to call update for a full update", but this should be discussed. |
Good point, a simple solution might be to just add a semaphore at the start of |
I am currently testing the semaphore version, but what I am wondering about is this line: Line 485 in d256f43
This looks quite redundant too me, since it is called in all relevant paths later aswell. Maybe this can be removed here? |
Fix #213