Closed koraa closed 5 years ago
Hey, I'm glad that you like the library. Continuable does an allocation in following two circumstances:
continuable<...>
or promise<...>
when_all
...)Probably it would be possible to store the promises of an unknown type in a preallocated space, so you could ellide the memory allocation completely when deferring the promise resolution.
Avoiding the memory allocation for the shared state in connections is currently not possible nor planned.
Thanks for your quick response :) I am still trying to wrap my head around the library…
In my use case I just wouldn't use type erasure, so that would be fine, but the connections using allocation would be a problem in an allocation-free application… Thanks for the infos anyways :)
Thanks for your great library; I am excited to finally see proper promises in C++ :D Now to my question: Would it be possible to support environments in which allocation is not an option? Under which conditions are allocations mandatory at the moment?