Re: Time Problem with NSThread
Re: Time Problem with NSThread
- Subject: Re: Time Problem with NSThread
- From: Wayne Anderson <email@hidden>
- Date: Fri, 30 Dec 2005 14:58:22 -0700
I tried setting the priority to max, [ NSThread setThreadPriority:
1.0 ]. This does not seem to help.
Again, the preferred solution would seem to be to take steps to make
our app insensitive to thread timing jitter. But 100 ms. seems like
a long time for a thread to be blocked even for a low priority thread.
Wayne
On Dec 30, 2005, at 1:42 PM, Jeff Moore wrote:
This sounds like your work thread is getting out competed by other
threads on the system. What priority are you giving it?
On Dec 30, 2005, at 11:25 AM, Wayne Anderson wrote:
Our app currently is using an NSThread to run a timing loop that
gets events from a Music Sequence. These events are then passed
on to an internal processor that fills an internal buffer with
samples. The Core Audio render thread then draws from this buffer
on each render call. This scheme works fine on a dual processor
G5 but on a 1.67 MHz PowerBook our internal NSThread occasionally
gets blocked for a very long time (long in computer terms at
least) on the order of 100 milliseconds. The block always seems
to coincide with the Core Audio render thread grabbing processor
time. The only thing we are doing on the render thread is calling
memcpy to move data to the supplied ABL. Setting the priority on
the NSThread seems to make no difference.
Is this kind of long blocking behavior normal?
Should we resort to a posix thread, or should we make use of ring
buffers or some other construct to process our events ahead of
time to make the app insensitive to this kind of thread timing
jitter.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40redrocksw.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden