Cocoa objects in pthreads
Cocoa objects in pthreads
- Subject: Cocoa objects in pthreads
- From: Luke Bellandi <email@hidden>
- Date: Wed, 20 Feb 2002 12:01:20 -0800
Can anyone shed some light for me as to how to appropriately access and
modify Cocoa objects from a pthread run loop?
We've got an application that needs to use pthreads because we set the
thread policy and priority (otherwise we'd probably use NSThread.) It seems
like we can't safely modify Cocoa objects from these pthread run loops
(specifically: update display ui widgets) since apparently autorelease pools
are tied to threads (so when we're running in our pthread body, there's no
knowledge for the ui widget of its owning application thread's run-loop, or
corresponding autorelease pool.)
Is there a way to set up a new autorelease pool for a thread? Or (better
yet) to add another thread as a client of an existing autorelease pool?
Thanks!
Luke Bellandi
CoreAudio
Apple Computer
_______________________________________________
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.