On Wednesday, 25 October 2017 at 01:26:10 UTC, Brian Schott wrote:

I've been reading the Fiber code and (so far) that seems seems to be reasonable. Can anybody think of a reason that this would be a bad idea? I'd rather not create a pull request for a design that's not going to work because of a detail I've overlooked.

Just skimming the Fiber code I found the reset(...) API functions whose purpose is to re-use Fibers once they've terminated.

Eager stack deallocation would have to coexist with the Fiber reuse API.

Perhaps the Fiber reuse API could simply be polished & made easy to integrate so that your original use case no longer hits system limits.

I.e. Perhaps an optional delegate could be called upon termination, making it easier to hook in Fiber recycling.

The reason my thoughts head in that direction is that I've read that mmap/unmmap 'ing frequently isn't recommended in performance conscious programs.

Reply via email to