Re: Port and runloop problem
Re: Port and runloop problem
- Subject: Re: Port and runloop problem
- From: Raphael Sebbe <email@hidden>
- Date: Sun, 26 Aug 2001 18:27:41 +0200
On Sunday, August 26, 2001, at 12:57 PM, Markus Hitter wrote:
>
Am Sonntag, 26. August 2001 um 09:08 schrieb Raphael Sebbe:
>
>
> The problem is that when there are "too many" of these NSPortMessage,
>
> some seem to be skipped.
>
>
In other words, your "refresh" handling needs more than 50% of the
>
system's performance?
>
Well, it is for rendering images, and when the rendering is simple,
refresh occurs more often.
>
> refresh
>
> refresh
>
> (...)
>
> refresh
>
> finished
>
>
You might consider just two messages: "startrefresh" and "stoprefresh".
>
This, the port's buffer wouldn't overflow. Between both messages,
>
refresh regularly based on an NSTimer.
>
Yes, this seems interesting.
>
> Is there a way to tell a message has to be absolutely delivered, or
>
> should I use other inter-thread comm technique
>
>
Using a NSNotification shouldn't be too complex.
>
refreshing implies GUI manipulation, so this is not applicable here (not
AppKit thread-safe).
>
Or your main thread has to acknowledge the message.
>
I believe I'll keep the timers
Thanks,
Raphael