Typo: Execution Cancellation: Extra )
numeralnathan opened this issue · 2 comments
numeralnathan commented
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.
Tembrel commented
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
);
numeralnathan commented
Thank you. That )
tripped me up.