threaded build

BlitzMax Forums/BlitzMax Beginners Area/threaded build

yossi(Posted 2014) [#1]
what threaded build do and when we need it ?


xlsior(Posted 2014) [#2]
'threaded build' is only necessary when your program uses the threading commands -- it uses a different garbage collector, and therefore needs to switch the compilation mode to work.

Most people will never use it in their games, but it's there for when you want to tap into their power.

'normal', un-threaded programs essentially run a single session on a single CPU core. a multi-threaded program can split itself into several seperate processeses which all run independently of one another but still have the ability to communicate between eachother. If allows your program to utilize more than one processor core at the same time, allowing it to benefit from the extra processor power present in your computer.

Some of the blitzmax commands are not thread-save, and can only be called from within the main program thread: most notably drawing to the screen.

you can use additional threads to perform other jobs without halting the main program: Game Logic/AI, network communications, file loading, etc...

So...

The good: Allows you to spawn background processes and have access to more CPU horsepower
The bad: It dramatically complicates the logic behind your program, and requires much more planning ahead to keep things straight.

Generally, not something for beginners...


yossi(Posted 2014) [#3]
thank you.