Thread issue

Raynor memphis007fr at yahoo.fr
Wed Jan 9 11:29:42 PST 2008


Sean Kelly a écrit :
> Raynor wrote:
>> Hi, I try to make a client/server application but i have issues with 
>> threads.
>>
>> import std.thread;
>> import std.socket;
>> import std.stdio;
>>
>> class Class1
>> {
>>     Thread listeningThread;
>>     Socket listeningSocket;
>>
>>     this()
>>     {
>>         listeningThread = new Thread(&Listen);
>>         listeningThread.start();
>           listeningThread.wait();
> 
> 
> Try adding this.  Phobos applications doesn't bother to wait for 
> executing threads before terminating.
> 
> 
> Sean

If i add listeningThread.wait();, my application is blocked.


More information about the Digitalmars-d-learn mailing list