Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / sdk and threads

Author
Message
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 26th Jul 2005 10:02
has anyone played around with multithreading their applications?

Im a linux guy so I like using pthreads, any idea if this will take a dump when i try to run it?

it should be fine as long as all the dsdk commands use _stdcall signatures... ideally...
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jul 2005 21:48
Unfortunately, the SDK is compiled in single-threaded mode - something I requested a change for even before release.

This means that you should *not* use threads in your main program, unless you can guarantee that you use none of the standard C/C++ library calls, or any SDK calls in your thread - none of these are thread safe.

All of the SDK commands use __cdecl, but that shouldn't be a problem. I don't understand how it could be ...

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 27th Jul 2005 02:56
oh its just i ran into a problem with threads when i was using some _fastcall signatures and it took me 4 days to figure out why it was breaking... im kinda paranoid about it now

but thats too bad about threads not working so well... i was going to have a thread that is responsible for loading resources...

Login to post a reply

Server time is: 2024-04-19 13:08:42
Your offset time is: 2024-04-19 13:08:42