I am trying to introduce concurrency in my classes and wish to stay within the GF environment and simulator we use. One simple scenario I am considering is a read/display only task where the count of the number of overlapping actors is displayed (painted) on the actors.
The idea is to spawn a thread for this actor and every time the stack count changes to update the display. When the stack count is zero the run method finishes.
For example, the actor can be a stackable mineral deposit than can be mined by other actors. The miners are not threaded, only the mineral deposits. It is fine if we lose a signal (counts are off), or generate exceptions due to sequencing (object has been removed), but I'd like to explore concurrency related issues and work towards a (correct) solution as much as is possible in GF.
The goal is to educate and discuss the various issues related to concurrent programming. It is entirely acceptable, indeed welcome, for students to experience various concurrency issues.
Many of my students are interested in moving on to game programming, and this introduction is essential in gaming environments.
I'd like to get a bit of a heads up from folks who have explored this in GF on the issues ahead and what to look for, or stay away from, and what can be worked around, and what does work.
Once completed, I will post a sequence of scenarios with comments for those interested in exploring the topic.
I will also post and update this thread with the example as we work through it.
Thanks.

