Jump to content
  • Advertisement
Sign in to follow this  
aaron_ds

Glib theards

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

Hi Can anyone point me in the direction of a decent Glib threads tutorial? The examples in the documentation only took me as far as creating and joining threads and all of the online documentation was just a mirror. I'm looking to implement play|pause|stop functionality for a thread and I have no idea where to start. What is the right direction to take? Thank you so much!

Share this post


Link to post
Share on other sites
Advertisement
I decided to expand my search to include other multithreading APIs. It looks like Java threads have suspend,resume methods as well as C# threads. How would one approach implementing these features using Glib/Posix threads?

When it comes to multithreading programming idioms, I'm lost.
Thank you!

Share this post


Link to post
Share on other sites
Pausing threads is an abstraction not supported by the OS. .NET and Java can support it because they are VMs.

If your thread has a top-level loop the easiest way to support pausing is to add a
while(paused[mythreadnum])sleep(); in the top-level loop.

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!