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
The logic in large parts of the bounded implementation is somewhat non-obvious, and partially stems from other code bases, so it might be a good idea to write down how it works, and that it works correctly, or find a document that already properly does that and link to it. (ad the comments that already exist partially duplicate each other, not necessarily adding to understanding of how all the components interact)
The text was updated successfully, but these errors were encountered:
I'm aware of that document (at least, I've read it in the past), but it doesn't really document how the book-keeping lines up (e.g. slot, tail, lap), and how/when these are incremented, what the intended flow is (in a blocking case, and a "channel filled enough that no blocking needs to happen" case), what edge cases might exist.
The docstring of one_lap sounds like one_lap is actually a constant, and indeed, it is not modified once a bounded channel is created, and it directly depends upon another instance variable mark_bit, so why is it even stored at all? (perf reasons?)
one_lap == mark_bit << 1, basically (and prevented from overflowing in release mode by the allocation above, which would fail)
see also #58 (comment) and a few related comments.
The logic in large parts of the
bounded
implementation is somewhat non-obvious, and partially stems from other code bases, so it might be a good idea to write down how it works, and that it works correctly, or find a document that already properly does that and link to it. (ad the comments that already exist partially duplicate each other, not necessarily adding to understanding of how all the components interact)The text was updated successfully, but these errors were encountered: