How is my CFRunLoopTimer getting called during a CFReadStream client callback?
How is my CFRunLoopTimer getting called during a CFReadStream client callback?
- Subject: How is my CFRunLoopTimer getting called during a CFReadStream client callback?
- From: "Jim O'Connor" <email@hidden>
- Date: Sun, 05 Jan 2014 15:37:24 -0900
When my read stream finishes I schedule a timer to clean up on the runloop to serialize access to shared resources.
However, I had a hang late last night because a mutex grabbed in the read stream callback handler was held and was also being grabbed when the timer it scheduled to clean up fired INSIDE the callback.
It was late and I didn't save the odd message in the Xcode stack crawl about the timer being called OUTSIDE of the runloop. And now I can't get it to repeat.
I was under the impression that timers only fired when the RunLoop was actually the top of the execution stack, or was called explicitly by me. Is this not right?
Thanks,
Jim
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden