Skip to content

fbie/threading-mysteries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET Threading Mystery Classes

Some C# classes that do mysterious threading things.

Do not browse the source code if you want to solve the mysteries!

How to build and run

Please install the .NET SDK version 8:

  • either by visiting the download page; or
  • by executing the script dotnet-install.sh in this repository (this is the official Microsoft .NET installation script.)

Make sure that the dotnet executable is in your environment variables.

To test, run the following command from the root folder of this repository:

$ dotnet build

Solve the Mysteries

Enter each mystery and run the compiled code using

$ dotnet run

There (up to) are three variants for each mystery.

  • What do you observe when running the different variants?
  • Do they behave the same?
  • Are they predictable?
  • Can you form a theory about the underlying implementation?

Acknowledgements

Threading mysteries are strongly inspired by:

Threading variants are based on:

The vending machine analogy is due to Bent Thomsen.

Threading mysteries were developed at SimCorp A/S for the OTC Core Knowledge Sharing series.

About

Mysterious!

Topics

Resources

License

Stars

Watchers

Forks