-
Notifications
You must be signed in to change notification settings - Fork 2
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
Nathan/scheduler #29
Nathan/scheduler #29
Conversation
Running in Parallel
API
Minor
|
The intention here was that we'd use the Pooled pool to designate concurrency, but you're right: since Pooled blocks this too will block. Argh. (Prior to the weekend the runqueue was indeed a channel of tasks, but I changed it to avoid having a bounded buffer there. Details to follow.)
Of course, agreed we want multiple in-flight requests. The intention here was to avoid thrashing by hammering downstream ReaderWriters, but, I have no evidence to suggest that this is an actual problem, so, happy to remove it until wee see otherwise.
Yep, this was what I had as of Friday: the problems as I saw it were: what should N be? The job of coordinating parallelism falls to Pooled, not this, so the goal was to avoid making that decision in the Prioritizer. It would be awesome if we can at runtime vary N, since that's exactly the number of in-flight requests we want to scale up and down, but that appears to be set in stone once the channel's created. Maybe the right solution here is to just make the depth of the channel "large enough"? I hate that though :)
I disagree that the Proritizer should be overfit to deal specifically with tags. Here's why: we nee to carry specific state along otherwise, as you do with the That said: if I'm wrong on all this, then I'm very happy to make "enqueue" private and have a tag-specific interface. |
what the heck, that must have been a last-minute mess-up on my part, else, how would this work at all...?
👍
I need to hold the mutex to read it out.
Ah, this is worth looking into.
Whoops! |
Moved to tethys-plc-bridge. |
Here's the Prioritizer. As I mentioned on Slack the interface diverged slightly but I think modifying your Tethys code to use it will be a straightofrward refactoring.
Though there are unit tests I forgot to write some example code; I'll push one up, but wanted to get the code up ASAP.