Andreas Zieringer schrieb:
look into OpenSG/Source/System/FileIO/Base/testLoaderRender.cpp for an example. In my app I do the file loading in a extra thread, to abort I kill the loading thread. I'll send you a small example later.

Do you use the thread classes offered by OpenSG or a system dependant thread library? I'm currently using something like this:
  BaseThread thread = BaseThread::create();
  thread->runFunction( function, arg );
(using "this" as arg, so I can call member functions of my class...)

However, that leaves me with no chance for cleanup if I have to terminate() or kill() the thread. That's why I'd rather write a thread class inheriting from OSG::Thread (where I could put cleanup code in the destructor). The constructor needs two arguments, however, and I'm not sure what to pass there:
        Thread (const Char8 *szName, UInt32 uiId);
At least the constructor is protected, not private...


Regards,
  Robert



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to