Answers for "semaphore in python"

0

semaphore in python

import threading

sem = threading.Semaphore() # or sem = threading.Semaphore(value=n)
sem.acquire()
# Your code here
sem.release()
Posted by: Guest on August-12-2021

Python Answers by Framework

Browse Popular Code Answers by Language