(typecode_or_type, size_or_initializer, *, lock=True, ctx=None)
return synchronized(obj, lock, ctx=ctx)
Return a synchronization wrapper for a RawArray
Return a synchronization wrapper for a RawArray
Return a synchronization wrapper for a RawArray
def Array(typecode_or_type, size_or_initializer, *, lock=True, ctx=None):
    '''
    Return a synchronization wrapper for a RawArray
    '''
    obj = RawArray(typecode_or_type, size_or_initializer)
    if lock is False:
        return obj
    if lock in (True, None):
        ctx = ctx or get_context()
        lock = ctx.RLock()
    if not hasattr(lock, 'acquire'):
        raise AttributeError("%r has no method 'acquire'" % lock)
    return synchronized(obj, lock, ctx=ctx)
def Array ( typecode_or_type , size_or_initializer , * , lock = True , ctx = None ) : obj = RawArray ( typecode_or_type , size_or_initializer ) if lock is False : return obj if lock in ( True , None ) : ctx = ctx or get_context ( ) lock = ctx . RLock ( ) if not hasattr ( lock , 'acquire' ) : raise AttributeError ( "%r has no method 'acquire'" % lock ) return synchronized ( obj , lock , ctx = ctx )