failsafe-lib/failsafe

Typo: Execution Cancellation: Extra )

numeralnathan opened this issue · 2 comments

Please correct the typo on this https://failsafe.dev/execution-cancellation/ for this line.

scheduler.schedule(() -> call.cancel(false), 10, TimeUnit.SECONDS);`

There is an extra ) after false. Perhaps, the code is correct and I struggled with Lisp.

Looks ok to me:

scheduler.schedule(() -> call.cancel(false), 10, TimeUnit.SECONDS);

schedule takes 3 arguments, callable, delay, and unit.

cancel takes one boolean argument.

Reformatting makes this more obvious:

scheduler.schedule(
    () -> call.cancel(false)
    10,
    TimeUnit.SECONDS
);

Thank you. That ) tripped me up.