Re: NSTimer not working in a multithreaded application

2010-09-03 Thread Greg Guerin
Abhijeet Singh wrote: Hi,I am working on a multithreaded software that runs on a medical instrument. The software has 2 parts. GUI and worker threads (worker threads sends commands to instrument). The GUI is developed using ObjectiveC and Cocoa. Worker threads are all in C and Carbon.It i

Re[2]: NSTimer not working in a multithreaded application

2010-09-03 Thread Oleksiy Gorelov
timer in method invoked in the main thread Oleksiy Gorelov --- Исходное сообщение --- От кого: "Wyatt Webb" Кому: "Abhijeet Singh" Дата: 3 сентября, 07:18:56 Тема: Re: NSTimer not working in a multithreaded application > > On Sep 2, 2010, at 7:37 PM, Abhijeet S

Re: NSTimer not working in a multithreaded application

2010-09-02 Thread Wyatt Webb
On Sep 2, 2010, at 7:37 PM, Abhijeet Singh wrote: > Hi,I am working on a multithreaded software that runs on a medical > instrument. The software has 2 parts. GUI and worker threads (worker threads > sends commands to instrument). The GUI is developed using ObjectiveC and > Cocoa. Worker threa

Re: NSTimer not working in a multithreaded application

2010-09-02 Thread Dave DeLong
Just a minor correction: All threads have a run loop created automatically, but only the main thread's run loop is running by default (if it's a GUI application). If you're on a secondary thread, you have to spin the run loop manually using one of its "run..." methods. But (in essence) you're

Re: NSTimer not working in a multithreaded application

2010-09-02 Thread Nathan Day
NSTimers rely on there being an NSRunLoop for the current thread, so if you are creating a timer in a thread without a run loop it will not work, because the is no run loop to add the timer to. From the sounds of it you also want the timer to be executed in the main thread, in which case you wil

NSTimer not working in a multithreaded application

2010-09-02 Thread Abhijeet Singh
Hi,I am working on a multithreaded software that runs on a medical instrument. The software has 2 parts. GUI and worker threads (worker threads sends commands to instrument). The GUI is developed using ObjectiveC and Cocoa. Worker threads are all in C and Carbon.It is a Cocoa application.I am wo