Closed casperisfine closed 3 years ago
We should probably try this (and the other changes we merged) out in production before cutting a release.
We should probably try this (and the other changes we merged) out in production before cutting a release.
Yes.
Hum, I'm having trouble with the GC test on CI, but somehow it passes 100% of the time locally 🤔
I tested it manually, it works well, I think it's just that the object must end up on the stakc somehow. Ruby Gc is unfortunately not 100 reliable. So I removed the finalizer test as I'd rather not introduce a flaky test.
By moving the thread and the socket in another object, the thread no longer keep a reference on the
BatchedUDPSink
, which means it can be GCed, and it turn it can signal the dispatcher object to shutdown.