On Mon, May 19, 2008 at 11:53 PM, Vitaly Ovchinnikov
<[EMAIL PROTECTED]> wrote:
> Hello
> I work on Cocoa application that uses posix thread to perform big
> calculations. I need to display the progress. Big caculations are done
> with C++ and I have a callback function that called by the calculating
> thread with the current progress (structure with data). I put this
> structures to the queue (std::vector, guarded by the mutex). This is
> the separate thread.
>
> Now the main thread: I need to check my queue and (among other things)
> update the progress. So I created NSTimer (with period of 0.1 second)
> that checks my queue and (among other things) calls -setDoubleValue
> for NSProgressIndicator. Maybe it looks a bit tricky, but it is just a
> marshalling of structures from one thread to another, it worked fine
> for me in Windows, it is tested etc....
>
> Now the problem: progress indicator freezes. It doesn't even play
> animation! It may move to 30% and freeze there.

If you send your progress view a setUsesThreadedAnimation: message
with a value of YES do it continue to animate?

If it does then you are somehow blocking your main thread.

-Shawn
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to