Jump to content
  • Advertisement
Sign in to follow this  
Asheh

Threading - deadlock?

This topic is 3417 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

I am currently attempting to separate the CPU from the GPU and allow the GPU to run in paralell with the CPU. I have written code to do this, but the thread which does the CPU processing creates threads within itself and calls wait() to wait for them to finish. Whenever I call wait within this thread, the application hangs. Im unsure why this is, as I understand wait() would stop the current thread of exectuion and wait for the other threads to finish. FWIW im using boost::threadpool (an extension to boost). If there is an alternative implimentation method to this, please let me know. Ashley.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Asheh
I am currently attempting to separate the CPU from the GPU and allow the GPU to run in paralell with the CPU.

It already does that without your help, you know. ;)
Quote:
I have written code to do this, but the thread which does the CPU processing creates threads within itself and calls wait() to wait for them to finish. Whenever I call wait within this thread, the application hangs. Im unsure why this is, as I understand wait() would stop the current thread of exectuion and wait for the other threads to finish.

There will be no visible difference between hanging and waiting for the other threads to finish if you can't guarantee that the other threads will finish. That would be the first thing to check in my opinion.

Share this post


Link to post
Share on other sites
So its not possible to queue up data to be ready for the cpu while im waiting for the gpu to finish?

Share this post


Link to post
Share on other sites
Your program is still running while the GPU is doing whatever it does. That's the whole point of having a GPU, in fact. But I get the feeling that's not exactly what you mean, so perhaps you could specify in more detail exactly what you're trying to achieve?

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!