cactoos icon indicating copy to clipboard operation
cactoos copied to clipboard

Create a Sleep class/object/decorator

Open fabriciofx opened this issue 4 years ago • 6 comments

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 avatar Sep 06 '20 04:09 fabriciofx

@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 avatar Sep 06 '20 10:09 victornoel

@victornoel it's used in Retry, ThreadsTest, TimedTest, AsyncTest, RetryTest and TimedFuncTest.

fabriciofx avatar Sep 06 '20 12:09 fabriciofx

@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.

victornoel avatar Feb 22 '21 11:02 victornoel

@0crat in

victornoel avatar Feb 22 '21 11:02 victornoel

@0crat status

victornoel avatar Jun 12 '21 14:06 victornoel

@0crat status (here)

@victornoel This is what I know about this job in C63314D6Z, as in §32:

  • The job #1439 is in scope for 4mon
  • The role is DEV
  • The job is not assigned to anyone
  • The budget is not set yet
  • These users are banned and won't be assigned:
    • @fabriciofx/z: This user reported the ticket
  • Job footprint (restricted area)

0crat avatar Jun 12 '21 15:06 0crat