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
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