cactoos
cactoos copied to clipboard
Create a Sleep class/object/decorator
Let's create a Sleep
object, because it's util in a lot of situations and we already use private void sleep()
in some places in Cactoos code.
@fabriciofx do you mean something like Thread.sleep
? Can you point to the place where we use this private void sleep()
you are referring to?
@victornoel it's used in Retry
, ThreadsTest
, TimedTest
, AsyncTest
, RetryTest
and TimedFuncTest
.
@fabriciofx let's create a new Scalar
decorator named Delayed
that would take a delay as a Duration
and a wrapped Scalar
, and would wait the delay before delegating to the wrapped object.
Then let's add a todo to do the same for the other cactoos interfaces + replace usage of Thread.sleep
where it makes sense.
@0crat in
@0crat status