Re: Close Threads

2018-05-28 Thread candle via Digitalmars-d-learn

sorry about my double post, but:

the receive in the search function, was first under (in) the 
(guess =! searchFor) block, but it was the same effect. for 
testing i have these writeln("test1 and 2").


writeln(guess) i have never seen.

is receive a loop itself ?


Close Threads

2018-05-28 Thread candle via Digitalmars-d-learn

Hey Folks.

I have a question about threading and how to close threads i 
don't need anymore.


In the following code, i build 3 threads with spawn from the 
concurrency module.


if one thread found the number, all others thread must stop 
search.


but i have a big logical problem in my mind.

i hope someone can help me to find a solution.

Happy Greetings

and here is the code:
https://pastebin.com/vQRediG6