Open
Description
It would be nice to have repeating tasks in the chain.
something like this:
newChain().repeat(c-> c.repeat(c->c.delay(10, TimeUnit.SECONDS).sync(this::updateSigns),6).async(this::updateDB),-1)
would do something like this
while(true){
for(int i = 0;i<6;i++){
wait(10, second)
(sync) updateSigns();
}
(async)updateDB();
}
(repeat would take a lambda that does stuff with a new chain that will be executed every time repeat is called)
Don't really know if the way I outlined that api is a good thing to do something like that, but I think the general concept of repeating some parts of a chain n (or -1 for endless) times.