Re: threading questions
Re: threading questions
- Subject: Re: threading questions
- From: Matthew D Hancher <email@hidden>
- Date: Tue, 18 Nov 2003 16:33:53 -0500
>
This isn't going to happen, at least not on the same device.
Oh! That's delightful. It certainly seemed like inside the HAL was
the right place to do this, but I'd heard from enough places not to
make any assumptions about when my listeners and ioprocs get called....
Is this fact actually documented in some document I haven't seen?
Perhaps I should give the documentation on writing HAL drivers a
read. Though I think this is the last of my HAL issues for now.
>
It's hard to do IO if the format of a stream changes on you until you
>
know about it.
Agreed! :)
Thanks,
Matt
>
When the driver tells the HAL that something major has changed, the
>
HAL won't call any IOProcs again until it has completely finished
>
calling out to the listeners. Conversely, the HAL holds off handling
>
notifications from the driver until the IO thread has gone to sleep.
>
The HAL works very hard to only call out to IOProcs/listeners for a
>
given device when that device is in a consistent state.
>
>
That said, if you are dealing with multiple devices, the IOProc for
>
device A can certainly interrupt you while you are processing a
>
notification from device B. The converse is generally not true unless
>
you go CPU bound in an IOProc for an extended period of time such that
>
the thread priority has degraded far enough or you have configured
>
kAudioHardwarePropertyRunLoop to use a thread that can successfully
>
compete against a time constraint thread.
>
>
And as Doug says, on MP systems, you won't get interrupted at all, but
>
rather the two threads will run concurrently.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.