yield package:streamly

Same as fromPure
Same as fromEffect
Rate control.
A worker decrements the yield limit before it executes an action. However, the action may not result in an element being yielded, in that case we have to increment the yield limit. Note that we need it to be an Int type so that we have the ability to undo a decrement that takes it below zero.
Returns whether the worker should continue (True) or stop (False).
  • LOCKING Unlocked access. Modified by the consumer thread and unsafely read by the worker threads
total number of yields by the worker till now
0 means unlimited