Re: Crash in CFReadStreamOpen
Re: Crash in CFReadStreamOpen
- Subject: Re: Crash in CFReadStreamOpen
- From: Jens Alfke <email@hidden>
- Date: Tue, 26 May 2009 14:35:19 -0700
On May 26, 2009, at 1:42 PM, Benoit Foucher wrote:
I'm getting an EXC_BAD_ACCESS crash in CFReadSreamOpen and I don't
understand why. The code only fails with OS X 10.5.7. It works fine
on 10.5.6. I wonder if this is perhaps because I add the stream to
another thread's run loop from the main thread. However, I didn't
see any mention of this not being thread safe -- on the contrary the
documentation seems to indicate that CF run loop functions are
thread safe...
I've had trouble in the past with thread-safety of CFRunLoop,
regardless of what the docs say.
Scheduling something on a different thread's runloop is a really
unusual thing. Ordinarily you'd do the setup and scheduling (i.e.
opening the stream) on the same thread that will be handling the
events. What's your code trying to do?
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden