Multi-Thread Application problem

Benjamin Schulte Aldoric at gmx.de
Mon Feb 4 10:25:25 PST 2008


Hello,

I'm having a problem with a problem in a multi threaded application since several days.

The problem itself is easy to describe. Let's say theres are two threads. Thread A and Thread B.
Thread A has to do most of the things for the application - drawing, movement, etc. (It's a game)
Thread B has to do all the loading stuff. Well since OpenGL doesn't support handling drawing methods from Thread B there is a class that does simply:
Thread B requests to call something and waits for Thread A to handle it - then it continues.

But sometimes - without any real sense where it happens Thread A stops - and Thread B - well, Thread B waits for Thread A at the told position.


However, I now wondered if it's possible that a Thread goes into the "critical mode" as soon a 'delete' is being called.

like:

delete abc;
-->
~this( )
{
// Within this there is no thread switching??
}
<--
// Now we can switch again


Hope you can understand what I mean >.> *not the best english*



More information about the Digitalmars-d mailing list