You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a feature request: We're using SuckerPunch which recently moved to concurrent-ruby Task, Queue and Executor models.
What we're missing are task implementations that by design are either "unique" (only 1 can be scheduled) or "serial" (only one can be executed at a time). I'm aware of SerializedExecution which would solve the "serial" aspect, however this would imply having a dedicated executor per task or limit all other (parallel) tasks, too.
Given that you already provide a TimerTask and SchedulerTask, how about a SerialTask and UniqueTask that can be executed using an multi-threading executor?
Thanks!
The text was updated successfully, but these errors were encountered:
Yeah this came up in the past, we need a way to throttle concurrency. Thanks for reaching to us. So far we did not discuss it much.
My vision is to have following API for Promises:
uniq=Throttle.new1no_more_than_3=Throttle.new3# 30 promises chains with throttled parts30.times.mapdo |i|
root=Promises.future(i)do |i|
# full concurrencyi + 1end.throttled(uniq)do |f|
# only one at the time is executedf.then{ |i| puts:c1,i;i}end.thendo |i|
# full concurrencyi - 1end.throttled(no_more_than_3)do |f|
# only 3 at the time is executedf.then{ |i| puts:c3,i;i}endend.map(&:value)
@rmoriz Thank you for the suggestion! This is definitely a feature we should look into at some point. Right now @pitr-ch need to focus our efforts on a 2.0 release do I'm going to tag this paused. We'll revisit after releasing 2.0. We're always happy to consider PRs for new features to Edge, so if anyone in the community would like to take this on in the mean time we'd be happy to support them.
I've a feature request: We're using SuckerPunch which recently moved to concurrent-ruby Task, Queue and Executor models.
What we're missing are task implementations that by design are either "unique" (only 1 can be scheduled) or "serial" (only one can be executed at a time). I'm aware of
SerializedExecution
which would solve the "serial" aspect, however this would imply having a dedicated executor per task or limit all other (parallel) tasks, too.Given that you already provide a
TimerTask
andSchedulerTask
, how about aSerialTask
andUniqueTask
that can be executed using an multi-threading executor?Thanks!
The text was updated successfully, but these errors were encountered: