Created
September 25, 2014 09:54
-
-
Save rofr/608e86031fe24476084a to your computer and use it in GitHub Desktop.
Playing with some thoughts on concurrency control models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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