Challenges with Supervisor Example in Effect Website: Delayed Return Values
Hi! I followed the Supervisor example on the Effect Website to guard against memory leaks by fiber accumulation (which happens in certain scenarios). However, now I found that this approach changes the behaviour of the supervised effect: It makes it so the return value is only produced at the moment that the supervisor "ticks". For example, if my program succeeds after 1050ms, and the supervisor is set to 1000ms, then the supervised effect only succeeds after 2000ms.
I believe it's because of how the Schedule only ends by polling the program's fiber status at the scheduled interval: