Thread Error


2003-09-15 01:23:15 AM
delphi143
Hi,
I have an OpenGL application where I render the scene through a separate
Thread.
I get this Error message over and over again:
' Thread Error: There is no more data available (259)'.
It always appear when I am loading a new scene from file.
Following two lines is used to halt and start the thread while loading a new
scene from file.
if not (RenderThread.Suspended) then renderThread.Suspend;
(here I do something like open the file)
if (renderThread.Suspended) then renderThread.Resume;
What can I do to solve this?
I'm using sleep(20), as a try to let the thread rest a little. It does not
seem to work that good.
Best regards,
Michael Lundqvist
XXXX@XXXXX.COM