[ros-users] need help: set_parameters service callback very sluggish with nodelet-based camera1394 driver

Jack O'Quin jack.oquin at gmail.com
Thu Feb 3 15:35:48 UTC 2011

On Thu, Feb 3, 2011 at 5:24 AM, Andreas Tropschug <tropschu at in.tum.de> wrote:

> Is this not the defining use case for pthread yield() ?
> It preempts and puts the current thread at the end of the run queue,
> effectively directly going to the waiting thread which acquires the
> lock. If there is no thread in the run queue, it immediately resumes.
> http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_yield.3.html

That's right. Some kind of yield() should work.

I am using the boost threads interface, so Ken suggested their yield() method.

I presume there's a pthread version under the covers somewhere, but
have not studied how boost handles Linux threading.

I might experiment with it some more later, but it's working OK right
now and I don't want to make unnecessary changes now with Diamondback
beta out.

More information about the ros-users mailing list