Game Development Community

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???!!!

#1
01/18/2005 (3:37 am)
You will probably find that the regulars around here cannot answer your question appropritely because you're in the Public Section of the forums. This change won't likely be script-only so your best bet will be to post in the Engine section of the closed Area, if you want to see code.

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.
#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.