[ros-dev] Mayday ... Critical Section problems
Rick Parrish
rfmobile at swbell.net
Wed Nov 1 20:18:33 CET 2006
Alex Ionescu wrote:
> Rick Parrish wrote:
>
>> Try this ... add a call to Sleep(0) just before attempting to acquire
>> the lock. That *may* produce better average performance.
>>
> You should never use Sleep(0), that's a horrible suggestion.
>
> Use Sleep(1) and/or, SwitchToThread(), and/or YieldProcessor() and /or
> __mm_pause ("pause").
>
Thanks Alex. I'll have to check these out.
Oh, and Timo's suggestion is very retro (but very valid) if you remember
VAX-11 architecture.
http://h71000.www7.hp.com/DOC/73final/4515/4515pro_023.html
(wandering off topic)
-rick
More information about the Ros-dev
mailing list