[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSThread defaultThread
From: |
Germán Arias |
Subject: |
Re: NSThread defaultThread |
Date: |
Tue, 10 Dec 2013 12:32:07 -0600 |
User-agent: |
GNUMail (Version 1.2.0) |
Hi,
Not sure if this can help you (with GCC):
http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Executing-code-before-main.html#Executing-code-before-main
Germán.
On 2013-12-10 08:55:05 -0600 Doug Warren <address@hidden> wrote:
> +initialize is being run as soon as the library is loaded, I assume some
> __attribute__((constructor)) mojo.
>
>
> On Tue, Dec 10, 2013 at 2:43 AM, Ivan Vu
ica <address@hidden> wrote:
>
>> There is no way for you to run +initialize as soon as the application
>> starts on the main thread? Other things might fall apart as well,
>> considering some things in modern OSes are per-thread; one example that
>> comes to mind is OpenGL contexts, but other things probably exist too.
>>
>>
>> On Tue, Dec 10, 2013 at 1:43 AM, Doug Warren <address@hidden>wrote:
>>
>>> Just to confirm there currently is no way to set the defaultThread once
>>> it's been set by +[NSThread initialize] correct? I realized today that for
>>> an application I have where the GNUstep library is loaded and +initialized
>>> is called from Java on a different thread than the JNI thread where I do
>>> all the GNUStep work. And as such no thread that would ever execute
>>> Objective C code was considered the mainThread. I'd like to either delay
>>> setting it until sometime after initialize or have a function to override
>>> the value from a different thread. But from looking at the code nothing
>>> like that currently exists correct?
>>>
>>> Thanks,
>>> -Doug
>>>
>>> _______________________________________________
>>> Gnustep-dev mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/gnustep-dev
>>>
>>>
>>
>>
>> --
>> Ivan Vu
ica
>> address@hidden
>>
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev
>