Re: Multiple Threaded Windows
Re: Multiple Threaded Windows
- Subject: Re: Multiple Threaded Windows
- From: "M. Uli Kusterer" <email@hidden>
- Date: Tue, 7 Oct 2003 21:02:42 +0200
Because these are NSWindows, could main be colliding with the
threads' calls, thus leading to a situation in which two threads
(the render thread and main) are issuing commands? I don't do any
drawing except from the threads, so each thread is rendering only
into its own context. Something is still corrupting things enough to
hang the hardware. Do I need to do further overloading of NSView to
make certain that the main thread is never trying to do any drawing
within the view?
I'm no threads guru, but from what I know, AppKit is *not*
thread-safe. The only thing supported by Apple with regard to GUI so
far is manipulating it from the main thread. (Apparently, Apple have
long-term plans to make both Carbon and Cocoa thread-safe, but that
may be in MacOS 11...)
Have you looked into dispatching any calls that relate to the windows
via the main thread? NSThread has a method for calling methods on the
main thread. This may not be as effective, but may be your only
option.
Hopefully, someone else with more knowledge of threads has a more
positive answer for you.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.