def __init__(self):
"""
Create an ordered barrier. When processes wait on this barrier, they are let through one at a time based
on the provided index. The first process to be let through should provide an index of zero. Each subsequent
process to be let through should provide an index equal to the current value of the internal counter.
"""
import multiprocessing.sharedctypes
self.cvar = multiprocessing.Condition()
self.sval = multiprocessing.sharedctypes.RawValue('L')
self.sval.value = 0
评论列表
文章目录