You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Consumer's Registration is returned when the Consumer is passed to Reactor.on. As things stand, if the Consumer wants to access its own Registration it cannot do so without being at risk of a race condition: the Consumer's accept() method may be called before Reactor.on has returned so it won't have access to its Registration.
One solution would be for a Consumer to optionally implement RegistrationAware and have the registry pass the Registration to the Consumer before it's actually added to the registry - this would ensure that the Registration is set before accept can be called.
The text was updated successfully, but these errors were encountered:
A
Consumer
'sRegistration
is returned when theConsumer
is passed toReactor.on
. As things stand, if theConsumer
wants to access its ownRegistration
it cannot do so without being at risk of a race condition: theConsumer
'saccept()
method may be called beforeReactor.on
has returned so it won't have access to itsRegistration
.One solution would be for a
Consumer
to optionally implementRegistrationAware
and have the registry pass theRegistration
to theConsumer
before it's actually added to the registry - this would ensure that theRegistration
is set beforeaccept
can be called.The text was updated successfully, but these errors were encountered: