Glib theards

Started by
1 comment, last by Trap 17 years, 9 months ago
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!
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!
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.

This topic is closed to new replies.

Advertisement