Skip to content

Instantly share code, notes, and snippets.

@ted80
Created October 26, 2015 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ted80/e9d6e2937c797ff49b94 to your computer and use it in GitHub Desktop.
Save ted80/e9d6e2937c797ff49b94 to your computer and use it in GitHub Desktop.
public Object ditIsEenLock = new Object();
public void threadA()
{
lock(ditIsEenLock)
{
while(true)
{
//endless loop
}
}
}
public void threadB()
{
lock(ditIsEenLock)
{
//kan niet in komen
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment