Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
*NEW*
Current Version on
STEAM
:
16.026
Logfile:
EN
,
DE
Webchat:
Visit the chat
Home
Help
Search
Login
Register
GLBasic forum
»
Main forum
»
GLBasic - en
»
Threads in GLBasic?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Threads in GLBasic? (Read 2581 times)
Eric.Erpelding
Mc. Print
Posts: 32
Threads in GLBasic?
«
on:
2016-Mar-17 »
Hello GLBasic Programmers, I have a simple question.
Does GLBasic support threads in Windows?
Logged
spacefractal
Community Developer
Prof. Inline
Posts: 4025
Re: Threads in GLBasic?
«
Reply #1 on:
2016-Mar-17 »
It's possible, but it's not thread safe at all. So crash is very easy to been happens.
Logged
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.
MrTAToad
Guest
Re: Threads in GLBasic?
«
Reply #2 on:
2016-Mar-17 »
There is an example in these forums (and possibly in the examples directory with your GLBasic installation) too...
Logged
kanonet
Administrator
Prof. Inline
Posts: 1137
Re: Threads in GLBasic?
«
Reply #3 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.
Logged
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64
Eric.Erpelding
Mc. Print
Posts: 32
Re: Threads in GLBasic?
«
Reply #4 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/
Has anyone here used it in a GLBASIC program?
«
Last Edit: 2016-Mar-18 by Eric.Erpelding
»
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
GLBasic forum
»
Main forum
»
GLBasic - en
»
Threads in GLBasic?