From: Godfrey v. d. L. <gv...@ma...> - 2008-04-02 06:27:50
|
On a more general point---now that multiCPUs machines are getting to be very common, does apple even ship a single CPU machine anymore---I think we will need true multi-threaded runtimes. Is that work happening? Do you need any help? Where would I go to help? Godfrey van der Linden On 2008-03-13, at 17:25 , Laurent Sansonetti wrote: > Hi Matias, > > On Thu, Mar 13, 2008 at 4:31 PM, Matias Pablo Brutti > <mat...@gm...> wrote: >> Hi , >> >> I've read that rubycocoa has some issues with threads , NSThreads, >> which >> will be the best approach to take to actually use threads?, which >> type of >> threads should I use and finally is there an example or doc on >> rubycocoa >> threads that you recommend ?, >> >> I'm implementing an application that makes lots of requests which >> takes some >> time. My idea is to thread that process and while I receiving he >> info update >> the TableView, all this while not frezzing my main application but >> without >> threads I do not see how to do that. any ideas ? >> > > The current version of Ruby (1.8) not being thread-safe, it is > currently impossible to use NSThreads. Well you can, but RubyCocoa > will route calls into the main thread for you (to avoid crashing), and > it might cause a deadlock sometimes. > > The preferable way is to use Ruby threads instead. In Leopard, both > the interpreter and RubyCocoa were modified to support calling > Objective-C from Ruby threads. But this support is not ideal (you can > see that as a hack), and sometimes it doesn't work. > > You can also use NSTimers or any other mechanism driven by the Cocoa > runloop. > > HTH, > Laurent > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |