Idea for event based thread support

BlitzMax Forums/BlitzMax Programming/Idea for event based thread support

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I don't think there is such a thing as totally safe threading, is there? As soon as you split a program into more than one piece you inevitably must have the potential for collisions unless they are totally permanently isolated from each other, which makes their access to the same data impossible. To share access one or the other thread has to be put on hold - a lock of some kind, to prevent access. So I don't think we really need to worry about totally safe threads, it's not doable, but you can at least aim for temporary lock-out (which actually temporarily defeats the idea of threading, funnily enough).

That said it would still be *really* cool to have more than one thread in BlitzMax, even if it was only a total of 2 threads. I think perhaps theads should be implemented in a way that is not *totally* safe, to begin with, so people who feel comfortable can use it sooner, and then later refine it to be safer.