[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thred, Sockets, timers and runloop
From: |
Manuel Guesdon |
Subject: |
Thred, Sockets, timers and runloop |
Date: |
Fri, 27 Apr 2001 11:51:22 +0200 (CEST) |
I work on a gsweb application which should handle and timers in a different
threads.
basically gsweb create a NSFileHandle like that
[NSFileHandle fileHandleAsServerAtAddress:host
service:[NSString stringWithFormat:@"%d",port]
protocol:@"tcp"] retain];
and wait for NSFileHandleConnectionAcceptedNotification notification
in my application, I create a new thread ( [NSThread
detachNewThreadSelector:@selector(runTimerThread:)
toTarget:self
withObject:nil]) and add timers.
Now I want that this thread handle timers ticks and that the main thread still
responds to incoming connections.
I've tried many things these last days (and found strange problems) but none
worked.
Any idea about how to do this ?
Thank you.
Manuel
- Thred, Sockets, timers and runloop,
Manuel Guesdon <=