dragon.mpbridge.sharedctypes.DragonArray

class DragonArray

Bases: Array

A ctype array co-located on the same node by default as the creating process

__init__(typecode_or_type, size_or_initializer, lock: Lock = None, ctx: None = None)

Initialize the mpbridge array object.

Parameters:
  • typecode_or_type (str or ctypes, required) – the typecode or type is returned from the dictionary, typecode_to_type

  • size_or_initializer (range , int , list , required) – the array for the object

  • lock (creates lock for synchronization for array) – dragon.native.lock.Lock, optional

Methods

__init__(typecode_or_type, size_or_initializer)

Initialize the mpbridge array object.

acquire()

Acquire the internal lock object

release()

Release the internal lock object

Attributes

raw

value

__init__(typecode_or_type, size_or_initializer, lock: Lock = None, ctx: None = None)

Initialize the mpbridge array object.

Parameters:
  • typecode_or_type (str or ctypes, required) – the typecode or type is returned from the dictionary, typecode_to_type

  • size_or_initializer (range , int , list , required) – the array for the object

  • lock (creates lock for synchronization for array) – dragon.native.lock.Lock, optional

__getitem__(pos)
__len__()
__setitem__(pos, arr)
acquire()

Acquire the internal lock object

property raw
release()

Release the internal lock object

property value