Re: Thread issue - sure can use some help
Re: Thread issue - sure can use some help
- Subject: Re: Thread issue - sure can use some help
- From: John Draper <email@hidden>
- Date: Fri, 07 Apr 2006 17:10:29 -0700
Jeff Moore wrote:
The crash looks to me like your thread is trying to message a bad
ObjC object. That implies some kind of data coherency issue in your
code. My guess is that you have one thread that is disposing of an
object while another thread is trying to use it.
yes - That is what I suspect, but I'm clueless as to how to deal with
it. Especially since I'm using
a thread from some outside non-mac code I'm using (JRTPLIB). Although
it uses the POSIX
pthreads, somehow I have to get it to "know about" the MTCoreAudio. If
you've seen my
earlier postings, I asked the group about using the @synchronize
directive, but don't know
how to use it, or how much latency it's going to introduce in the program.
The hang is a deadlock of some flavor. This means that one thread is
blocking while holding onto a lock that is blocking the other thread
while it tries to acquire the lock.
yes - I suspect this to be the case, but I'm clueless as to how to deal
with it, and this is why I'm
willing to share the code and have others (who have the time) to review
it, but privately (off the list)
of course. And if others are interested, I'll be happy to post the fix
if I ever find it.
Both problems are pretty basic parallel programming problems that
unfortunately, have no set answers.
yes - and I'm not a systems kernal programmer and not familiar with
multi-threading concepts...
The solution is going to be totally driven by the context. You need
to look very closely at how the various threads interact with your
data and design a locking solution that ensures that things like this
don't happen while at the same time allowing the code to still be
able to satisfy the real time demands of the audio system (ie. make
the deadlines and don't block the IO thread, ever).
Yes - I've been working on that, but cannot do that because I don't have
the source of Cocoa tools,
and I still haven't been able to get any response from the MTCoreAudio
framework author.
But let me ask this.... lets say there IS object contention in
MTCoreAudio, and I assume such,
is there a way I can still keep this from happening. I was referred to
the @synchronize directive,
but not even ONE single example of how to use it....
the source for MTCoreAudio is on the net.
John
_______________________________________________
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