ChicagoBoss / tinymq

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

Expire unused channels and only have one channel supervisor #7

Closed rambocoder closed 12 years ago

rambocoder commented 12 years ago

Hello Evan,

What do you think of the changes that I introduced.

Each channel gen_server will time out after max_age in seconds and disappear from memory.

I also noticed that in current design, each channel has its own supervisor, well, why not just have 1 supervisor for all channels?

thanx

evanmiller commented 12 years ago

This is great, thanks. Initially I was thinking each channel might run on a separate node, but this is not supported, so 1 master supervisor makes sense.