GLBasic forum

Main forum => GLBasic - en => Topic started by: Eric.Erpelding on 2016-Mar-17

Title: Threads in GLBasic?
Post by: Eric.Erpelding on 2016-Mar-17
Hello GLBasic Programmers, I have a simple question.
Does GLBasic support threads in Windows?
Title: Re: Threads in GLBasic?
Post by: spacefractal on 2016-Mar-17
It's possible, but it's not thread safe at all. So crash is very easy to been happens.
Title: Re: Threads in GLBasic?
Post by: MrTAToad on 2016-Mar-17
There is an example in these forums (and possibly in the examples directory with your GLBasic installation) too...
Title: Re: Threads in GLBasic?
Post by: kanonet on 2016-Mar-17
(Official) multithread support: http://www.glbasic.com/forum/index.php?topic=3642.msg26493#msg26493
But use Graphic/sound/etc commands in main thread only, your secondary threads are for expensive logic only.
Title: Re: Threads in GLBasic?
Post by: Eric.Erpelding on 2016-Mar-18
Thank you for your replies.
The pthreads-win32 project might be a way to provide multi-threading support.
http://sourceware.org/pthreads-win32/ (http://sourceware.org/pthreads-win32/)
Has anyone here used it in a GLBASIC program?