Open kamilkloch opened 5 hours ago
I am very suspicious of this line: https://github.com/typelevel/cats-effect/blob/2d89990e15ac0ee72bed2900fab09fcbd28ed3bf/std/shared/src/main/scala/cats/effect/std/Dequeue.scala#L161
if I understand correctly, when there is a pending taker when an offer happens, the state does not increment the size. However, when _take
ultimately gets called, it does decrement the size in the state. So when offer is called when a taker is pending, size gets decremented by 1 once both effects have finished executing, instead of getting incremented then decremented.
Output:
(Run on CE 3.6-ecf93db)