Does BMax have multithreading yet?
BlitzMax Forums/BlitzMax Programming/Does BMax have multithreading yet?
| ||
Gah, searches come up with all the old topics about it. I saw that the new garbage collector is threaded... so can someone clue me in? I haven't been around in a while... so kinda lost. |
| ||
Yes... it does. |
| ||
So how does it work? Can you spawn threads from blitz code directly, or is it just thread safe? Is there any kind of documentation I can look at? |
| ||
Taken (and modified a bit) from 'blitzmax/samples/threads/threads.bmx': |
| ||
Alright! I've been in the electronics world for a while... but maybe it's time to dust off BMax for a bit of playing around with! Thanks Plash, exactly what I was wanting to know. |
| ||
Global Mutex:TMutex = CreateMutex() error : Tmutex not found !! |
| ||
K@li: Turn on Program menu -> Build Options -> Threaded Build. Make sure you're using the latest BlitzMax release too! |
| ||
Great !! thanks.... |
| ||
Ok, so there's decent documentation on threads, mutexes, and semophores, but nothing really about CondVars and a few new functions: AtomicAdd and AtomicSwap. Do these two work on variables without the need to use a mutex? |