Jump to content
  • Advertisement
Sign in to follow this  
Tangletail

Need Some Resources for Multi-Threading

This topic is 1040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Lo all! I need some primary resources for a number of things, to fix my engine up a bit with. But those can all wait for later as there is one major concern. Multi-threading.

Unfortunately, information on this topic is lacking, and most books I've picked up only spend a brief second to talk about it... because it is still assumed that Multi-threading is a concept of the past.

Does anyone have any reference material that they can suggest to me? And if language is a needed information... I primarily work with Lua and C++. And I do read the Bitsquid Blog... but some of the things are lost on me... as these are  concepts I hadn't brushed by yet.

Share this post


Link to post
Share on other sites
Advertisement

Hi.

because it is still assumed that Multi-threading is a concept of the past, more like the Future.

 

If you want you can try boost threading doc good and has some cool stuff, But compile time may go up a bit.

 

Threading is easy its the Data synchronization thats the hard part.

 

Things to look for Mutex, semaphore, lockfree queue(advanced)

 

Google Threading c++ here, here, boost threading, more

 

Most important part Data synchronization .

 

Take your time and get it done wright.

Share this post


Link to post
Share on other sites

Hmm... should gamelogic be a multi-threaded process?

I plan on running a component system,  I've been contemplating having all Entities and Components be implemented in LUA with low level systems being controled in C++. This was so I can add a real time debugger and code editing process to reduce  compile times.

 

C++ would handle data things that would be performance sensitive, with API built into LUA.

Example Pseudo Code:

On TriggerActivated

    Spawn particles(Position, "Fire")

Particles will be updated by C++ while the LUA code continues on with its business

 

But due to Threading reasons, it might not be all that plausible.

Edited by Tangletail

Share this post


Link to post
Share on other sites


On TriggerActivated

Spawn particles(Position, "Fire")

Particles will be updated by C++ while the LUA code continues on with its business



But due to Threading reasons, it might not be all that plausible.

 

You would gain no benefit in speed by this. So I understannd that LUA sends a simple instruction "Spawn particles(Position,count, "Fire")" and c++ thread that handles them will also instantiate them as its data. This seems more like implementing some ordered  stack of LUA instructions that main thread serves at some point. You need to first undersand how a single thread works extremly well, before thinking you may incorporate a second thread to a benefit of first thread.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!