Queues are used in python3. What's the difference between multiprocessing.Queue and queue?

my environment is python3.6

about queues (direct import and using multiprocess modules)

from multiprocessing import Queue, queues
import queue

what"s the difference between queue imported directly and imported through multiprocessing?
I tested it and it works, even if you use multithreading to fetch data from the queue, you can also use from multiprocessing import Queue (I don"t understand the multi-process and a from multiprocessing import queues, which is not the same as from multiprocessing import Queue).
from the initial code, I don"t see any difference between them (they can even be mixed with), python. They don"t provide so many queue modules for no reason, do they? I feel very confused. I would like to ask what is the difference between them. Can they be mixed?

Jun.08,2021

simply put, every time you visit multiprocessing.Queue , you add a lock.

Menu