gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying live video -- how to notify main loop from another thread


From: Marek Peca
Subject: Re: Displaying live video -- how to notify main loop from another thread?
Date: Fri, 9 Jul 2010 15:07:50 +0200 (CEST)

Please, tell me: is it needed to create threads using GNUstep thread API, or may I use ordinary glibc pthreads? The whole application is written in plain C, requiring about 5 threads (2 camera threads, slower computation, disk file output, GUI) with different priorities, including a setting of SCHED_FIFO etc. I would really like to avoid GNUstep API for threads and use plain POSIX threads and to use GNUstep only for the GUI.


It is not required, however GNUstep does need to know that the app is multithreaded. In a single-threaded app, it doesn't bother locking some things internally. The simplest thing to do is start an NSThread that exits immediately when your app launches. This will ensure that anything that needs to be in multithreaded mode is.


Excellent, this is what I wanted to hear.


Many thanks,
Marek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]