Skip to content

Instantly share code, notes, and snippets.

@rofr
Created September 25, 2014 09:54
Show Gist options
  • Save rofr/608e86031fe24476084a to your computer and use it in GitHub Desktop.
Save rofr/608e86031fe24476084a to your computer and use it in GitHub Desktop.
Playing with some thoughts on concurrency control models
public abstract class Actor
{
public abstract void OnTokenReceived();
}
public class TokenRing
{
List<Actor> _actors = new List<Actor>();
public void Run()
{
while (true)
{
foreach(var actor in _actors) actor.OnTokenReceived();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment