[osg-users] OpenThreads won't stop on Windows...

Shayne Tueller shayne.tueller at hill.af.mil
Wed Jan 6 21:40:37 PST 2016


Thanks for the feedback. 

I wasn't doing the checkCancel() in my loop in the run() method. Once I put that in there, it started working as expected when I called cancel() for a particular thread.

Interestingly, when I started pinning each thread on a different processor using setProcessorAffinity(), I could no longer cancel the threads (i.e. they wouldn't stop running). If I let the OS scheduler decide where the threads are running (by not calling setProcessorAffinity()) or pin the threads on the same processor, cancel() started working again. 

Not sure why it is doing this. For now, I'll just ignore setting the processor affinity for each thread so that cancel() will work properly when I shut down the threads...


Read this topic online here:

More information about the osg-users mailing list