Closed ysbaddaden closed 1 month ago
I'd suggest adding a note at the callsites re: the reasoning behind this.
@Sija I went to write a note, but then it occurred to me that if the object doesn't exist then there's nothing to iterate in the first place.
True, yet the future me would like to know that these methods shouldn't allocate anything.
Darn, I hoped this would solve also https://github.com/bcardiff/crystal-fswatch/issues/5 but it does not seem the case.
These methods are called during GC collections, which may happen before the Thread::LinkedList objects are created, leading to an infinite loop of malloc -> collect -> malloc -> collect -> ...
Kudos to @BlobCodes for identifying the issue!
fixes #14633