(Process input, process it in parallel, when done sum it, then serialize the result, etc)
-
-
So waiting doesn't block the flow of work, as the wait processes other tasks. There is the potential for deadlock if used incorrectly rather than spawning a dependent task though.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
True
1 vastaus 0 uudelleentwiittausta 1 tykkäys -
In theory true. In practice not. Again, tweets will fail here, but when I get a chance to make another diagram I will.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
In practice this has been working well for myself and others, though I'm sure it can be improved.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Here is the example. Basically waiting on one core can starve other cores. Avoiding waits will keep your cores all saturated with work. You can see a real-world example of this here: http://twvideo01.ubm-us.net/o1/vault/gdc2015/presentations/Gyrling_Christian_Parallelizing_The_Naughty.pdf … (1/3rd down)pic.twitter.com/HUytO6gB4L
3 vastausta 0 uudelleentwiittausta 2 tykkäystä -
So my intuition "continuations better than waits" is empirically correct. Great
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
I think the word empirical is wrong here as you need to compare real alternatives with similar effort. A task manager with continuations might have higher overhead such that tasks need to be less fine grained, and fine grained tasks help reduce bubbles and increase scalability.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjille @dougbinks, @Manu343726 ja
I do think explicit dependencies are worthwhile, and they are on the plan for enkiTS once I get some solid time to implement and test.
2 vastausta 0 uudelleentwiittausta 0 tykkäystä -
FWIW, I checked out EnkiTS and I don't think you need to modify it to accommodate dependencies or continuations. A user can easily create a TaskSetWithContinuation class derived from ITaskSet or build a dependency hierarchy that just calls your scheduler.
1 vastaus 0 uudelleentwiittausta 2 tykkäystä
@Manu343726, if you're evaluating it, I would definitely give this a go and write your own derived class to support continuations/onComplete tasks.
-
-
Adding single task continuations should be trivial, but also not that useful since you could also just launch the tasks at the end of your task function, and this doesn't solve the issues mentioned above. Multiple dependencies such as the proposed C++ when_all are trickier.
2 vastausta 0 uudelleentwiittausta 1 tykkäys -
Vastauksena käyttäjille @dougbinks, @tloch14 ja
If you're willing to use more of the std library than I am in enkiTS, and don't mind allocations too much then it's easier.
0 vastausta 0 uudelleentwiittausta 1 tykkäys
Keskustelun loppu
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.