hi steve,
there is openthreads::thread an easy to use api. it's still part of
openscenegraph. you have just go through
this api. or you can juste write thread like the following pattern:
class MyThread : public OpenThreads::Thread {
public:
MyThread() {
m_kill = false;
start(); //starts the thread
}
virtual void run() {
while ( ! m_kill ) {
// do something in the thread
}
}
~MyThread() {
m_kill = true;
join();
}
private:
bool m_kill;
}
... adegli
2006/12/19, Steve Webb <[EMAIL PROTECTED]>:
Hello.
I'm looking to add some networking to an existing OSG app of mine. I'm
going to need a dedicated thread for processing socket I/O. Is there an
example of this somewhere in the OSG examples? I tried "grep Thread
*/*.cpp" in the examples dir and I couldn't find a whole lot to work with.
Does anyone have a simple example of just opening up a viewer and spawning
a thread to count at the same time or something quick-n-dirty like that?
- Steve
--
EMAIL: (h) [EMAIL PROTECTED] WEB: http://badcheese.com/~steve
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/