A shadow context is a vertx context that references a context belonging to a different vertx instance.
Such context enables the usage of a vertx instance (e.g. a client) from another vertx instance and ensure that callbacks are on the correct thread.
One use case is the usage of a Vert.x client from a Vert.x server with different instances. This provides event-loop segregation between vertx instance ensuring that the server event-loop only process server IO and are disjoint from the client io operations.
Shadow context happens when a context is obtained from a vertx thread of another vertx instance:
Sticky context becomes a stick event-loop so the context implementation is not tied to the current thread, this provides the same intended behaviour with the benefit to avoid keeping the reference to a context which implies the rewrite of a few tests (the tests setting an exception handler outside the event-loop)
Possible extension
an SPI to provide context implementations for non vertx thread, allowing a runtime to be called back on the executor of its choice could be implemented
A shadow context is a vertx context that references a context belonging to a different vertx instance.
Such context enables the usage of a vertx instance (e.g. a client) from another vertx instance and ensure that callbacks are on the correct thread.
One use case is the usage of a Vert.x client from a Vert.x server with different instances. This provides event-loop segregation between vertx instance ensuring that the server event-loop only process server IO and are disjoint from the client io operations.
Shadow context happens when a context is obtained from a vertx thread of another vertx instance:
Noticeable changes
Possible extension