Hi,
if you are creating the timer from
- a vertx event-loop thread, the timer will always be executed by the
same thread
- a vertx worker thread, the timer will always be executed from the
same context but not the same worker thread. However the context will
execute one task at a time and issue a memory barrier so that there is
no race happening
- from a non vertx thread
- in vertx 3, you get a random event-loop each time you create the timer
- in vertx 4, you get a random event-loop assigned the first you the
timer is created (or before if a context was obtained before from the
non vertx thread)
HTH
Julien