01.07.2011, 10:55
Quote:
If the threads never communicate ever then that should be OK. But don't forget that the PAWN natives aren't thread safe either. If you are using a text draw for your cursor for example, and your main thread is creating TDs too, you could end up creating two at the same time and, due to the way empty slots are found and assigned, you could get two with the same ID, and then I'm not sure what would happen (which is the main problem with threading).
|
okay so the only thing i need to do is to create the player textdraw in ongamemodeinit, (so 500 td's),
then only get player stats and settextdrawstring in the threat should be safe? if you set corrupt data i hope it won't crash so the next cycle can set the good data.
okay . again? just make a callback and put the code in there, and that's a thread? <wow>
sorry I ask it soo many times but I don't want to corrupt my GM.
and if I want a thread to run 50 times a second i need to do sleep(1000/50) ? and do I need to lock/unlock the thread or can I just do it without?