swift-lang / swift-t

Swift/T: High Performance Parallel Scripting Language
http://swift-lang.org/Swift-T
Apache License 2.0
53 stars 22 forks source link

Priority threshold #182

Open j-woz opened 4 years ago

j-woz commented 4 years ago

Need a feature to suspend release of prioritized tasks until a user-provided queue size (or time) is reached, allowing for prioritization to happen.

Start with TURBINE_PRIORITY_THRESHOLD=10

meaning: don't release prioritized tasks until 10 are in the queue.

CC @jozik @ncollier

jozik commented 4 years ago

My sense is that the queue length won't help in the use cases we were thinking about, but a combination of the following two:

would. Without the priority threshold value (i.e., one that says what's the threshold of priority values for tasks under which they will be accumulated), we'd be tracking tasks that don't need to be accounted for, so it would be particularly hard to assign a meaningful queue length. Also, our use cases indicated that providing a task accumulation idle time should be simple and intuitive enough to specify.

j-woz commented 4 years ago

That makes sense.