ChicagoBoss / tinymq

TinyMQ - a diminutive, in-memory message queue
MIT License
124 stars 43 forks source link

Prevent duplicate subscribers on a channel #4

Closed rambocoder closed 12 years ago

rambocoder commented 12 years ago

Checks if the new subscriber pid is already subscribed and do not add it to the list of subscribers more than once.

On second thought, the function name could be called: add_subscriber_if_not_subscribed(NewSubscriber, Subscribers)