Listeners are cleaned up lazily, e.g. every time getListeners API
is called we also remove garbage-collected items. Although, due to an
unpredictable nature of the garbage collector and no guarantees about the
frequency of getListeners API calls we schedule the below loop to be executed every
minute, and make sure there are no extra references to obsolete listeners
Types of changes
[ ] No changes in production code.
[] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Change list
Listeners are cleaned up lazily, e.g. every time
getListeners
API is called we also remove garbage-collected items. Although, due to an unpredictable nature of the garbage collector and no guarantees about the frequency of getListeners API calls we schedule the below loop to be executed every minute, and make sure there are no extra references to obsolete listenersTypes of changes