Multithreading
by Mak Andrew · in Torque Game Engine · 01/18/2005 (2:56 am) · 2 replies
Hi,
Currently, i'm trying to create a separated thread to pull data from the database(using MySQL) and then update the object pos in torque engine
In the separate thread, i have a loop that pull data from the database. For the first few loop, every things is just fine, however as the loop process, the pulling of data fail. However when i do these in single thread, the engine works perfectly.
HELP???!!!
Currently, i'm trying to create a separated thread to pull data from the database(using MySQL) and then update the object pos in torque engine
In the separate thread, i have a loop that pull data from the database. For the first few loop, every things is just fine, however as the loop process, the pulling of data fail. However when i do these in single thread, the engine works perfectly.
HELP???!!!
About the author
#2
01/18/2005 (9:50 am)
While Stefan is right, I beleive that the loop is your problem. You shouldn't do a loop, you should make just one interaction and schedule the thread to run again soon, using some structure to hold what it still has to do.
Torque Owner Stefan Lundmark
If this is just a general question then I guess what I said above doesn't hold any truth but to me it sounds like you're in need of help with the code.
Good luck.