edisonywh / rocketman

🚀 Rocketman help build event-based/pub-sub code in Ruby
MIT License
141 stars 4 forks source link

Rethink notifying consumer strategy #1

Closed edisonywh closed 5 years ago

edisonywh commented 5 years ago

As /u/byroot pointed out on Reddit, this infinite Thread spawning when emitting event is not the most scalable way to go about it as Threads are not cheap in Ruby.

One potential solution is to use thread pool, which seems to be the way to go.

Ruby's queue seems to be a good way to implement it