Skip to content
Claim this template

Free course template · Global

Concurrency safety: Threads, locks and race conditions

A ready-made course, live deck and two surveys for back-end developers and systems engineers. 40 minutes, 6 lessons. Last reviewed 21 October 2026; not legal advice.

Claim the templatePreview the courseDownload SCORM for your LMS

Free. No credit card. Edit everything.

Play a game from the course

Concurrency safety: Threads, locks and race conditions: try 3 questions

Three questions from this course. Pick an answer, then see why.

Play the game

Game not loading? Open it in a new tab (opens in a new tab)

Three pieces that work together

Learners sign in, so every finish and score is recorded. 6 fields to fill in with your details.

Claim the template
The Concurrency safety: Threads, locks and race conditions course as a learner first sees it

6 lessons, about 40 minutes

Minutes are an estimate.

  • Lesson 1: A counter that was wrong every tenth run · 8 min

    Before you begin · The bug · What went wrong

  • Lesson 2: Threads, processes and async · 8 min

    Compare · Which model? · Check

  • Lesson 3: Locks, mutexes and semaphores · 8 min

    Tools · Pick the tool · Check

  • Lesson 4: Race conditions and deadlock · 6 min

    Deadlock · Break it

  • Lesson 5: Concurrency patterns by language · 5 min

    Patterns · Check

  • Lesson 6: Reviewing concurrent code and final assessment · 5 min

    Review checklist · Practice

Claim the template

Inside this course

Taken from the course itself.

By the end, learners can

  • Distinguish threads, processes and async tasks
  • Choose between a mutex, a semaphore and a lock-free approach for a stated use
  • Explain how a race condition arises and fix it
  • Spot a deadlock and break it by ordering locks
  • Review concurrent code against your team's rules

Sample questions, with answers

  1. What was the root cause of the short total?

    • A race condition on shared state
    • A slow network
    • A typing mistake
    • Too many payments

    Answer: A race condition on shared state. Two workers changed shared state without protection.

    Lesson 1: A counter that was wrong every tenth run

  2. What does a mutex guarantee?

    • Only one owner holds it at a time
    • Every worker gets a turn in order
    • Workers never wait
    • Memory is never shared

    Answer: Only one owner holds it at a time. A mutex gives one owner at a time.

    Lesson 3: Locks, mutexes and semaphores

  3. What is the usual way to prevent this kind of deadlock?

    • Agree one order for taking locks
    • Take locks at random
    • Use more locks
    • Never test

    Answer: Agree one order for taking locks. A fixed order stops a circular wait.

    Lesson 4: Race conditions and deadlock

A scenario from "Locks, mutexes and semaphores"

Five workers may use only three database connections.

Best response: A semaphore with a count of three.

Weaker responses: A mutex; No limit; Sleep between calls.

Related articles

An article from the AhaSlides blog that uses this course.

Common questions

Yes. Claiming the template and editing it are free.

Yes. The course is self-paced and online, and the live deck lets you add a live session in the room or online.

At onboarding of back-end engineers, and after a race-condition incident.

Back-end developers and systems engineers; run by senior engineers and engineering managers with L&D.

Record completion in your own LMS or record system, so you can show who finished the course and when.

Your own details, each highlighted inside the course:
  • Link to the engineering standards or style guide
  • Where completion is recorded
  • Who to ask for help or to report a concern
  • Link to the self-paced course
Then edit anything else you like: wording, scenarios, your logo.
Visit the help centre (opens in a new tab)