Re: CFMessagePortSendRequest seems to ignore sendTimeout
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com david. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... At 23:55 +0100 13/3/05, Stéphane Sudre wrote: I had a look at the CFMessagePortSendRequest source code and the time-out is used for the mach_msg call. So the time-out does not apply to the whole CFMessagePortSendRequest code and there does not seem to be any atomic restrictions in the code which would prevent other processes to take CPU time during the execution of this method till the call to mach_msg. Not sure it would explain the situation. It might explain it at least partly, but I now have timings of up to 9 ticks without getting a timeout error. That means that CFMessagePortSendRequest can apparently take as long as 0.15 seconds and not time-out even though I have requested it to time-out at 0.02 seconds. That is a duration 7.5 times longer than the time-out I set and defintily not what I would expect. Could it be that the timeout values should not be specified as a double in seconds, but as something else? I have just counted 115 times (in 45 minutes of operation on a 17" PB) a duration exceeding at least 0.067 sec (which is 4 times the time-out of 0.02). So it does not appear that rare (I think about 10% of the communication is exceeding my set time-out value). It also means that each of these times CFMessagePortSendRequest is blocking my thread way too long. I did not expect the overhead of this call to be so large and it would seem to me this might be some kind of bug. This email sent to site_archiver@lists.apple.com
participants (1)
-
David Niemeijer