Re: Task when used on a function that takes parameters doesnt work.

2020-11-12 Thread Daniel Kozak via Digitalmars-d-learn
On Thu, Nov 12, 2020 at 4:12 PM Daniel Kozak wrote: > On Thu, Nov 12, 2020 at 4:05 PM Ruby The Roobster via Digitalmars-d-learn < > digitalmars-d-learn@puremagic.com> wrote: > >> Here is a test that I did: >> >> void func(int i) >> { >> Thread.sleep(i.seconds); >> } >> void main() { >> auto test

Re: Task when used on a function that takes parameters doesnt work.

2020-11-12 Thread Ruby The Roobster via Digitalmars-d-learn
On Thursday, 12 November 2020 at 15:12:55 UTC, Daniel Kozak wrote: [...] Thanks.

Re: Task when used on a function that takes parameters doesnt work.

2020-11-12 Thread Daniel Kozak via Digitalmars-d-learn
On Thu, Nov 12, 2020 at 4:05 PM Ruby The Roobster via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > Here is a test that I did: > > void func(int i) > { > Thread.sleep(i.seconds); > } > void main() { > auto test = Task!func(3); > test.executeInNewThread(); > test.yeildForce();