Ease thread execution
#7

i bet he means "multitasking" in the sense that a process (updating speedometer in a textdraw) gets triggerd after, lets say, 400 ms, but the timer running the checks for the timestamp, would run @ 20ms.
20ms timer runs 19 times "for nothing" (nothing equals no CPU time wasted also),
and at the 20th run it would calculate the timestamp being too old: update textdraw.
imo, a good trick for doing such things, is to use ONE short timer for all that - like 100 timers running @ 10 ms would cause major CPU-waste due to the context switching (suxx hard on windows)

good idea to discuss about that btw, iam always curious on finding better ways to let 1 thread like "load/save 10000 houses" working in background.

addition: i once tested that multithread plugin by frosha, i had some crashes as expected and mentioned, but another time it didnt crash at all for some reason. it had something to do with the timer type, and if the used callback contained ANY return; (now i remember: a threaded callback is/was? not supposed to return)

more thoughts please!
Reply


Messages In This Thread
Ease thread execution - by Stewie` - 21.12.2012, 12:37
Re: Ease thread execution - by Y_Less - 21.12.2012, 14:46
Re: Ease thread execution - by Stewie` - 21.12.2012, 15:12
Re: Ease thread execution - by Y_Less - 21.12.2012, 15:18
Re: Ease thread execution - by Stewie` - 21.12.2012, 15:30
Re: Ease thread execution - by Y_Less - 21.12.2012, 15:58
Re: Ease thread execution - by Babul - 22.12.2012, 21:08
Re: Ease thread execution - by Y_Less - 22.12.2012, 22:12
Re: Ease thread execution - by BlueX - 26.12.2012, 21:46
Re: Ease thread execution - by Stewie` - 26.12.2012, 22:32
Re: Ease thread execution - by [HLF]Southclaw - 30.12.2012, 18:22

Forum Jump:


Users browsing this thread: 5 Guest(s)