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

2018-01-03 Thread ChangLong via Digitalmars-d
On Tuesday, 2 January 2018 at 07:10:14 UTC, ChangLong wrote: On Monday, 1 January 2018 at 03:06:42 UTC, David Nadlinger wrote: On Saturday, 30 December 2017 at 13:48:16 UTC, ChangLong wrote: After fiber yield, the spoke guard is not able to execute, unless I throw a exception in Fiber. I am l

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

2018-01-01 Thread ChangLong via Digitalmars-d
On Monday, 1 January 2018 at 03:06:42 UTC, David Nadlinger wrote: On Saturday, 30 December 2017 at 13:48:16 UTC, ChangLong wrote: 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 Interrupte

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

2017-12-31 Thread David Nadlinger via Digitalmars-d
On Saturday, 30 December 2017 at 13:48:16 UTC, ChangLong wrote: 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. There isn't. In f

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

2017-12-31 Thread Jack Stouffer via Digitalmars-d
On Saturday, 30 December 2017 at 13:48:16 UTC, ChangLong wrote: 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

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

2017-12-30 Thread ChangLong via Digitalmars-d
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 lo