Is there a way to call scope guard without throw exception?

ChangLong changlon at gmail.com
Sat Dec 30 13:48:16 UTC 2017


I try to find a way to yield custom fiber without throw 
exception,  is it possible ?

I need make sure the scope guard is executed and the resource 
will auto release relay on scope(exit).

After fiber yield, the spoke guard is not able to execute,  
unless I throw a exception in Fiber.  I am look if there is some 
hack method to make the fiber Interrupted at any time with  
scope(exit) code executed.





More information about the Digitalmars-d mailing list