On Fri, 27 Apr 2001 11:23:01 +0100 Richard Frith-Macdonald <[EMAIL PROTECTED]>
wrote:
>| So what you have described should work ... your timer thread would
>| create the timers then
>| enter the runloop and run indefinately. As timers fire it should send
>| notifications.
>|
>| As there is only one notification center, the observer registered in
>| another thread should
>| still see the notification.
>|
>|
>| You don't actually say what the problem is ... if you could produce a
>| small testcase demonstrating
>| it, I could try debugging.
Thanks.
I've got very strange problemes (crashes, locks,...).
So, I've made a small application which handle http request, launch timers and
retrieve web pages to test this. It was
working.
Finally I've found the problem: calling NSTimeZone +timeZoneWithName (for exemple:
[NSTimeZone timeZoneWithName:@"EST"])
produce these strange things when it is called in a multi-threaded application. I
don't know exactly why but removing
these calls made my application well running...
Here is a project with the NSTimeZone +timeZoneWithName call (in test.m). It does a
http request every 15 seconds and you can do a
http request on it, port 9001 (wget "http://youmachine:9001").
Without the timeZone call, it works. With it, the 2nd http request you can make is
blocked.
testThreads.tgz
Manuel