1. Home
  2. Data Science
  3. Python
  4. Which threading primitive prevents simultaneous access to…

Added 25 Nov 2026

Which threading primitive prevents simultaneous access to shared data in Python?

  1. Event only
  2. Timer
  3. Lock Correct answer
  4. Barrier only

Correct answer

C. Lock

5 views

MCQSEXAM

Explanation

A Lock ensures only one thread enters a critical section at a time.

Reference

Asked in: Python Interview Advanced

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs