It is not required, however GNUstep does need to know that the app is multithreaded. (..)

On 9 Jul 2010, at 13:56, Richard Frith-Macdonald wrote:
(..)
There are quite a few things which use NSThread, and if you call them from an unknown thread you are asking for trouble.

Currently the API to handle this is to call GSRegisterCurrentThread() in each thread before it calls any other gnustep code, and call GSUnregisterCurrentThread() when your thread is about to exit.

You do not need to do this for any thread which doesn't use GNUstep though.


So, if I'm getting it right, I should follow the following scenario:

- create several threads using pthreads
- for each of them (probably only one of them), call GSRegisterCurrentThread() at the beginning - then, I may call NSView -setNeedsDisplay:, but it currently does not work, so I should use performSelectorOnMainThread... instead
OK?


Thank you,
Marek

_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to