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: Steve Checkoway <email@hidden>
- Date: Sun, 9 Apr 2006 19:06:22 -0700
On Apr 8, 2006, at 5:00 PM, John Draper wrote:
Jeff Moore wrote:
On Apr 7, 2006, at 5:10 PM, John Draper wrote:
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.
I'm not an ObjC expert, but I think the @synchronize directive
works more or less like synchronized methods in Java do.
Many people have mentioned this, but when I ask them about how to
use it, I just get blank stares.
I found just ONE technote that mentioned it, but no mention about
the object I pass it and
what it does. Is this the object that has the data structures I'm
to protect? or is this
the object pointing to the class I'm in when I call it?
If it's anything like Java, then it is acquiring that object's
monitor and it will block until it is acquired and once acquired,
nothing else can enter the monitor. It's more or less like
http://portal.acm.org/ft_gateway.cfm?
id=358824&type=pdf&coll=portal&dl=ACM&CFID=402248&CFTOKEN=20978246
I have no idea what you are talking about when you mention "P" and
"V" above...
In Dijkstra's THE operating system, he invented semaphores and gave
names to the two operations P and V. This paper is a bit self-
absorbed at the beginning but describes semaphores in the appendix:
http://portal.acm.org/ft_gateway.cfm?
id=363143&type=pdf&dl=GUIDE&dl=ACM&CFID=12480957&CFTOKEN=95562556
As for the names, V stands for verhoog which is Dutch for increase
while P stands for his made up word prolaag which wikipedia tells me
is short for probeer te verlagen; loosely translated as try to
decrease. To quote from http://en.wikipedia.org/wiki/Semaphore_%
28programming)
This confusion stems from the unfortunate characteristic of the
Dutch language that the words for increase and decrease both begin
with the letter V, and the words spelled out in full would be
impossibly confusing for non–Dutch-speakers.
Of course, I've always found P and V to be impossibly confusing, no
more or less so than verhoog and verlagen.
- Steve
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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