camonitor all_updates=True not doing what it should?
rcardenes opened this issue · comments
After noticing I was missing some (very close) updates I decided that this was due to the default merging behavior of camonitor
, so I tried monitoring with all_updates=True
. But then I got no updates at all. Turns out that all_updates
has effects on the size of the underlying deque. Relevant code:
self.__values: Deque[AugmentedValue] = collections.deque(
maxlen=0 if all_updates else 1
)
Now, collections.deque(maxlen=0)
gives us a deque that effectively is always full.
Maybe the original intention was to make it collections.deque(maxlen=None)
(the default)?
Good catch! That is correct, the original intention was for an unbounded queue. I've fixed it and added a test in #25