multi threading

BlitzMax Forums/BlitzMax Programming/multi threading

ftbass(Posted 2005) [#1]
Hi,
I want to draw an animation while I'm attempting to access to a website, so I was wondering if there was any way to do multi threading with Blitz Max.

Has anyone the answer or another solution?

thx :)


Kev(Posted 2005) [#2]
ive wrote a win32 only thread module, available below.

kev


FlameDuck(Posted 2005) [#3]
Not really, sorry. There is a library for Windows somewhere, but for multiplatform there isn't. Would be cool tho'.


ftbass(Posted 2005) [#4]
Thanks for replying, I'll take a look

see ya


Robert Cummings(Posted 2005) [#5]
Not really, sorry. There is a library for Windows somewhere, but for multiplatform there isn't. Would be cool tho'.


Totally agree with you. The dual core stuff is even making it's way down to the entry level market. Soon, I don't think you'll be able to find single core stuff.

Stuff like gile[s] re-written in Blitzmax with threading would be just so... so fast and cool.


Robert(Posted 2005) [#6]
I tried implementing a cross-platform threading library using pthreads (which is a standard library on Linux / MacOS and there is a wrapper available for Windows). It worked for basic testing, but tended to crash on anything which involved the garbage collector. (So you couldn't LoadImage or LoadSound in another thread for example)

I spoke to Mark about this, and he said that he wasn't sure when threading capabilities might be added, but he was keen on the idea.


RktMan(Posted 2005) [#7]
getting BMax to kick off threads is one thing.

getting _everything_ running inside the BMax process (bmax runtime libs, c-libs, ui libs etc ...) thread safe is something else entirely.

it will take BRL's cooperation to make threading a reality for sure.


ImaginaryHuman(Posted 2005) [#8]
If the os wasn't so strict these days you could share the pointer to a the visible display and have one separate program update the screen while the other one reads the website. But alas.


Dreamora(Posted 2005) [#9]
hehe if it wasn't so strict it would still crash with a very nice blue screen of death because of every second thing created by a noob programmer as on Win95 Win98 days ;)