Re: java cocoa appkit application and multiple threads
Re: java cocoa appkit application and multiple threads
- Subject: Re: java cocoa appkit application and multiple threads
- From: Michael Dupuis <email@hidden>
- Date: Wed, 23 May 2001 08:19:10 -0400
I can only tell you what I know from my own experience with them. I wasn't
able to find any real documentation on this topic either.
I have had no problems with things not being thread safe. Currently, I spawn
a single processor thread when I need to do work, so I'm not using multiple
threads that all have access to the same window. This allows me to keep the
UI responsive, display the progress indicator, etc.
When my thread completes, it calls back to the window that spawned it and
sets any data that was being generated. It all seems to work pretty well.
If you're worried about things being thread safe, you could you
'synchronized' around any methods that might be accessed by multiple
threads.
Michael
>
From: email@hidden
>
Reply-To: email@hidden
>
Date: Tue, 22 May 2001 16:16:33 -0700 (PDT)
>
To: email@hidden
>
Subject: cocoa-dev digest, Vol 1 #55 - 15 msgs
>
>
To: email@hidden
>
Subject: java cocoa appkit application and multiple threads
>
From: "Nick Emery" <email@hidden>
>
Organization: Peramon technology Ltd
>
Date: Tue, 22 May 2001 13:09:22 +0100
>
>
i'm developing a java cocoa appkit based application on os x
>
and i'd like to have some of the processing done in a separate
>
thread so that the ui remain responsive. i've looked in all of
>
the os x developer documentation, but there is almost nothing that touches
>
on theads and java. does anyone know how to used multiple threads in
>
this environment? is the java appkit thread safe? if not, what is
>
the best way to get the ui thread to process data obtained
>
in other threads?