How to implement Canceleable spawn() from parent

aberba karabutaworld at gmail.com
Sun Jun 28 23:56:59 UTC 2020


On Sunday, 28 June 2020 at 23:39:07 UTC, Stanislav Blinov wrote:
> On Sunday, 28 June 2020 at 23:02:26 UTC, aberba wrote:
>
>> I believe this:
>>
>> StopWatch sw;
>> sw.start;
>>
>> works becuse D structs are initialized by default, right?
>> I've never actually done it this way. Little details.
>
> Yup. You can also do a
>
> auto sw = StopWatch(AutoStart.yes);
>
> and not have to call `start` explicitly.

Interesting. I should look into Phobos more.


More information about the Digitalmars-d-learn mailing list