while(true)

Imperatorn johan_forsberg_86 at hotmail.com
Sun Sep 26 08:50:47 UTC 2021


On Saturday, 25 September 2021 at 10:37:25 UTC, Selim Ozel wrote:
> On Saturday, 25 September 2021 at 10:32:10 UTC, jfondren wrote:
>> On Saturday, 25 September 2021 at 10:17:32 UTC, Selim Ozel 
>> wrote:
>>> [...]
>>
>> What this program does is run with two threads, one sleeping 
>> in a loop and one waiting for the other thread to end. If 
>> you're starting a thread so that you can call Thread.sleep in 
>> it, that's not necessary. You could just rename `threadFunc` 
>> to `main` here, and of course get rid of the original main(), 
>> and it'd work.
>
> That's much better. Thanks a lot.
>
> Selim

Just a reminder, you can also write 5.seconds


More information about the Digitalmars-d mailing list