Re: kqueue OK in 10.4, not calling back to CFSocket in 10.3
Re: kqueue OK in 10.4, not calling back to CFSocket in 10.3
- Subject: Re: kqueue OK in 10.4, not calling back to CFSocket in 10.3
- From: John Stiles <email@hidden>
- Date: Tue, 28 Feb 2006 09:22:17 -0800
BTW, given a design which minimizes locking on shared resources, threads
aren't really a performance penalty at all. Particularly in this day and
age of dual-core CPUs, threads are the best way to get /more/
performance out of your code.
Jerry Krinock wrote:
on 06/02/25 22:36, Greg Herlihy at email@hidden wrote:
I have one suggestion although I give it little chance of fixing the
problem: I noticed that the CocoaDirWatcher project is built against the
current Mac OS. ....
The theory behind this idea is that building the app against [current] 10.4
frameworks, libraries and headers is causing some kind of problem when
running the app on Panther.
I think that Greg is probably correct, because both Mark D. and I "swear"
that we tested our projects running on Panther a couple months ago, and they
worked.
Meanwhile, someone contacted me off-list and explained that using a second
thread may in fact be a cheaper performance penalty than having the main
loop check the CFSocket for inputs on every cycle. With my religious
convictions thus undermined, and realizing that further pursuit of CFSocket
would likely, at best, uncover some bug in the system which would take Apple
a year to fix, I gave up on CFSocket.
Instead, I modified CocoaDirWatcher to spawn a kqueue-watching thread, and
now it works in Tiger and Panther both. Actually, it's a lot less code,
although not as educational!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden