Promises in D

Vladimir Panteleev thecybershadow.lists at gmail.com
Thu Apr 8 05:22:40 UTC 2021


On Thursday, 8 April 2021 at 04:53:47 UTC, Calvin P wrote:
> I don't see a case your Promise solution can void copy Slice 
> but refCount need do copy.

The paragraph you quoted discussed delegates, not promises.

Promises do need a copy always, as I stated in my post.

> If the Buffer refCount is zero when Unique Slice released, the 
> resource is release to object pool for reuse.

You don't need an object pool at all with delegates. You can just 
pass a slice of an array on the stack.



More information about the Digitalmars-d mailing list