pothosware / pothos-library

Framework library used by all Pothos projects
www.pothosware.com
4 stars 0 forks source link

reference counted tokens for use with async messages #61

Closed guruofquality closed 10 years ago

guruofquality commented 10 years ago

To create a back-pressure mechanism for messages that do not associated with a limited resource pool based on output buffers:

Whenever a message is sent, a reference counted token from the output port is sent along with that message. The reference counted token stays with the message until the message is consumed by the downstream, then the token is returned to the upstream output port. Work will not be called on a block until it has at least one token available.

guruofquality commented 10 years ago

related https://github.com/pothosware/pothos-library/issues/33

guruofquality commented 10 years ago

https://github.com/pothosware/pothos/commit/831ca5146fda7a64f7adb5cca804090833bb0e71