4 thoughts on “Common Multithreading Mistakes in C#; Part I

  1. Hello, thanks for the series of articles about multithreading, very helpful!

    Noticed a subtle mistake:

    In this example:

    ReactorEventDispatcher.HeatCritical += async () => {
    var triggerShutdownTask = Task.Run((Action) ReactorEventDispatcher.TriggerSafetyShutdown);

    await triggerShutdownTask;


    you should have written:
    to achieve a deadlock,
    await triggerShutdownTask
    will return execution to calling context with no problems.


    1. Hi Alexander, thanks for the correction. I’m currently in the process of migrating the blog to a new platform and once that is complete I’ll write up an edit regarding your comment.

      Thanks, and merry Christmas :)


Add a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s