Hi

On 7/7/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
Hi Adrain,

Looking at the Win32 OpenThreads::Thread::YieldCurrentThread()
implemention - its just a Sleep(10) which looks a bit a hack, under
pthreads there is s proper sched_yield() call.

Is there a Win32 properly thread call for yielding the processor?

void SwitchToThread(void) (NT/2000/XP/2K3) does the job. (On W2k3
platforms, there exist the YieldProcessor macro but I don't know
exactly what it does ...)
Adrian, maybe you can modify OpenThreads, replacing Sleep(10) by
SwitchToThread() and see if it improves your performance.


There are pthread implementations under Windows, perhaps you could use this.
Won't those be based on Win32 API, thus adding an extra layer between
OpenThreads and Windows ?

Thibault
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to