Promises in D

Vladimir Panteleev thecybershadow.lists at gmail.com
Wed Apr 7 16:43:59 UTC 2021


On Wednesday, 7 April 2021 at 16:14:15 UTC, Calvin P wrote:
> I use refCount to pass resource with promises provide by 
> QuickJS, It also work well with async IO code based on D.

Reference counting doesn't change the situation. With delegates, 
the resource provider can pass a temporary view into an internal 
buffer owned by the provider. With reference counting, you still 
need to allocate memory dynamically, and possibly do an 
additional copy from the internal buffer to the reference-counted 
one.



More information about the Digitalmars-d mailing list