Hi Marcus,

On Fri, 2005-03-04 at 14:52 +0100, Marcus Lindblom wrote:
> Hi,
> 
> We're trying to use OpenSG from Java in Windows, succeeding somewhat 
> (OpenSGCanvas anyone? ;), 

sounds pretty neat! Any plans of making it OS when it's done?

> but have found that it's quite picky about 
> it's threads.

True.

> Mainly, it seems to be assumed that all threads are created by opensg's 
> thread manager, and there seem to be no detection if opensg is executing 
> in a thread which does not have any local storage yet (i.e. change 
> list), 

We thought about it, but decided against it, as this is one of the most
performance-critical parts of OpenSG, so we wanted to avoid overhead
here. 

> This would not be a big problem, since I've managed to derive from 
> ExternalThread and call intialize() to set an aspect to use for threads 
> created in java, so initialization and rendering works just fine.

OK.

> However, during exit, when the process dies, the C-runtime system 
> deletes all global/class-static data in the OpenSG-dll, and this seem to 
> be done in a thread which has not been initialized (and does not go 
> through any of my code).

ARGL. Don't you just love Windows?

> I suppose the solution would be to correctly handle the 
> DLL_THREAD_ATTACH and DLL_THREAD_DETACH in the DllMain() function of 
> each DLL. This would allow OpenSG to initialize its thread-local data 
> for all threads being called (either defaulting to one aspect, or using 
> some dummy null-aspect, or something). Also, thread detaching would 
> correctly. However, I have only some experience with DLL's and threading 
> in windows (or at all), so there may be a better way to solve this.
> 
> Is this something someone has thought about, had experience with or 
> solved already, I'd be very grateful to hear what you have to say.

Sorry, have to pass here. I only use Windows under thread of force, and
so far nobody's forced me to look into that. Anybody else?

        Dirk

-- 
Dirk Reiners <[EMAIL PROTECTED]>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to