Closed numeralnathan closed 2 years ago
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.
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
)
afterfalse
. Perhaps, the code is correct and I struggled with Lisp.