Sign in to follow this  
Lazy Foo

Suggestions for semaphore and mutex examples for the tutorials

Recommended Posts

I'm trying to think of a simple example program for my tutorials. I'm stuck because I can't think of an example program that wouldn't involve video functions in seperate threads. So far I came up with this: For the semaphore tutorial I though of having the blitting function being protected with a binary semaphore and have two threads blitting a set of images on the screen. For the mutex/conditions tutorial I was thinking doing a classic producer/consumer dealie. On one side the producer shows its randomly produced set of images and on the other the consumer shows it's copy of the images. Yeah so any ideas you guys throw at me would be appreciated.

Share this post


Link to post
Share on other sites
How about a ship that has different functions which run separately from each other: such as shields, guns, reload of guns, regeneration of shields, power output.

or something similar....?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this