All the calls to DGDK are already sync locked (VB/.net version of mutexing) so at the end of it all, only one thread will be using a component of DGDK at one time, e.g.
SyncLock oDBImage
oDBImage.DeleteImage(dgdkID)
End SyncLock
and
SyncLock oDB3D
oDB3D.MakeObjectPlane(dgdkID, width, height)
End SyncLock
The two examples above can run at the same time, but only one thread can access oDBImage at a time and the same goes for oDB3D.
I've managed to have two threads running and accessing the various functions and the only issue I have had is when a Sync is required. Hence the idea of one thread handling the Sync and LoopDGK.
Due to the nature of the Component system (2d UI) this currently doesn't need an aggressive loop so it does a Thread.Sleep(10) in the loop. It still seems very responsive but the CPU usage hardly goes up when running the program. Again this may change later if things require it.
The music thread is also of a similar vain, so doesn't require an aggressive loop so also has a Thread.Sleep(10)
Jas
----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"