Skip to content

Instantly share code, notes, and snippets.

@milleniumbug
Last active March 31, 2018 19:22
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 milleniumbug/ecce6be960fb6b9a641b814bda237099 to your computer and use it in GitHub Desktop.
Save milleniumbug/ecce6be960fb6b9a641b814bda237099 to your computer and use it in GitHub Desktop.
Basic ground rules on multithreading

Following the analogy of basic ground rules, here I'm trying to come up with a similar list for multithreading.

  1. Nothing is thread safe unless effort has been made to make it thread safe.
  2. You can't assume that composition of two thread safe operations (g(f());) or objects is thread safe itself. This is a special case of the rule 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment