Re: bypass NSApp
Re: bypass NSApp
- Subject: Re: bypass NSApp
- From: Scott Thompson <email@hidden>
- Date: Fri, 10 Jul 2009 16:49:00 -0500
On Jul 10, 2009, at 3:40 PM, Julien Isorce wrote:
In GNUstep it's possible to decide which pthread is the "main thread".
I mean the first pthread which call GSRegisterCurrentThread, is the
main
thread.
And then the NSApp must be init and run in this main thread, as it's
required on MacOSX.
Is it possible to change the "main thread" as far as Cocoa is
concerned, on
MacOSX ? (something like GSRegisterCurrentThread)
What is the point of such a routine?
Suppose that the application starts and we give the main thread the
label "Thread A". You spin up an new thread that we will give the
label "Thread B. You then use your routine to make the thread with
the label "Thread B" to be the main thread. Now the main thread has a
"Thread B" sign and there is another thread with a "Thread A" sign
hanging off of it.
How is this different than if you had simply started the application
gave the the main thread the label "Thread B", then started a new
thread and gave it the label "Thread A"?
In this way no performInMainThreads are borken, and it's a solution
to my
problem.
It's still not clear what your problem is.
What exactly is it that are you trying to do on Mac OS X? What is the
environment in which your code is running and what effect are you
trying to achieve?
The only guess I can make is that you are trying to create a plugin
for something like the GIMP and you want to use Cocoa from that plugin.
There may be a way to solve your problem properly in Mac OS X, but we
need to know what the problem is (not how you think you want to solve
the problem).
Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden