Switching from Zthreads to SDL_Threads or Pthreads

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Switching from Zthreads to SDL_Threads or Pthreads

Post by h4zard »

Hate to create a new topic for this but since I have free time I figured I'd contribute to what has to be my favorite game of all time. How much work would it be to switch from zthreads to sdl_threads or pthreads ?, I have experience with sdl_threads but I haven't read through all of the source yet and figured a more prominent project developer would know what parts of the system utilizes zthreads? ,well besides authentication.
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by AI-team »

0.4 already got ported from zthread to boost::thread
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by h4zard »

I meant as far as 0.2.8 unless 0.4 has a sty+ct in which case I don't have a problem with using that so long as 0.2.8 clients won't be excluded.
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by epsy »

Except for exceptional cases, there will be no more updates on 0.2.8, so there is no reason we would invest time into refactoring it to use boost::threads.
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by h4zard »

Meant I would do the work epsy I just wanted to know how much threads are utilized and how much time and effort would I have to invest to refactor it to something more easily accessible and more common.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by Z-Man »

It's not much code to adapt, but threading is a very, very touchy issue. Even our code doesn't work 100% of the time. I would not want to integrate changes from non-members there.
(We do have a pthreads layer on 0.2.8, too, but it is untested and likely to be broken.)
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by h4zard »

I understand Z-man, though I do have a good bit of experience with threading, would the developement team, mind if I were to redistribute it after I get it working, if I put a disclaimer that it would in no way be supported by you guys and that its not an official release ?

The main reason I want to do this is because 0.4 does not have the sty+ct Respawn patches yet.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by Lucifer »

h4zard wrote:I understand Z-man, though I do have a good bit of experience with threading, would the developement team, mind if I were to redistribute it after I get it working, if I put a disclaimer that it would in no way be supported by you guys and that its not an official release ?
If anybody had a problem with that, it wouldn't be protected by the GPL.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Switching from Zthreads to SDL_Threads or Pthreads

Post by h4zard »

ahh wasn't aware of that Lucifer, then again I never checked so I'm at fault there ;p, once 0.4 gets the sty respawn system if it does I'll be one happy tronner ;p
Post Reply