Exemple #1
0
 def __init__(self,
              type_id=flux.FLUX_MSGTYPE_REQUEST,
              handle=None,
              destruct=False,):
     super(self.__class__, self).__init__(
         ffi, lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=[
             'flux_msg_',
             'FLUX_MSG',
         ],
         destructor=raw.flux_msg_destroy if destruct else None,)
     if handle is None:
         self.handle = raw.flux_msg_create(type_id)
Exemple #2
0
 def __init__(self,
              type_id=flux.constants.FLUX_MSGTYPE_REQUEST,
              handle=None,
              destruct=False,):
     super(self.__class__, self).__init__(
         ffi, lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=[
             'flux_msg_',
             'FLUX_MSG',
         ],
         destructor=raw.flux_msg_destroy if destruct else None,)
     if handle is None:
         self.handle = raw.flux_msg_create(type_id)
Exemple #3
0
 def __init__(
     self,
     type_id=flux.constants.FLUX_MSGTYPE_REQUEST,
     handle=None,
     destruct=False,
 ):
     super(Message.InnerWrapper, self).__init__(
         ffi,
         lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=["flux_msg_", "FLUX_MSG"],
         destructor=raw.flux_msg_destroy if destruct else None,
     )
     self.destruct = destruct
     if handle is None:
         self.handle = raw.flux_msg_create(type_id)
Exemple #4
0
 def __init__(
     self,
     type_id=flux.constants.FLUX_MSGTYPE_REQUEST,
     handle=None,
     destruct=False,
 ):
     super(Message.InnerWrapper, self).__init__(
         ffi,
         lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=["flux_msg_", "FLUX_MSG"],
         destructor=raw.flux_msg_destroy if destruct else None,
     )
     self.destruct = destruct
     if handle is None:
         self.handle = raw.flux_msg_create(type_id)
Exemple #5
0
 def __init__(self,
              type_id=flux.FLUX_MSGTYPE_REQUEST,
              handle=None,
              destruct=False):
     self.destruct = destruct
     if handle is None:
         self.external = False
         handle = raw.flux_msg_create(type_id)
     else:
         self.external = True
     super(self.__class__, self).__init__(
         ffi, lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=[
             'flux_msg_',
             'FLUX_MSG',
         ], )
Exemple #6
0
 def __init__(
     self,
     type_id=flux.constants.FLUX_MSGTYPE_REQUEST,
     handle=None,
 ):
     super(Message.InnerWrapper, self).__init__(
         ffi,
         lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=["flux_msg_", "FLUX_MSG"],
         destructor=raw.flux_msg_destroy,
     )
     if handle is None:
         self.handle = raw.flux_msg_create(type_id)
     else:
         #  Always take a reference on externally supplied flux_msg_t
         #   so that it can't be destroyed while the Python
         #   Message object is still active.
         raw.flux_msg_incref(self.handle)
Exemple #7
0
 def __init__(self,
              type_id=flux.FLUX_MSGTYPE_REQUEST,
              handle=None,
              destruct=False):
     self.destruct = destruct
     if handle is None:
         self.external = False
         handle = raw.flux_msg_create(type_id)
     else:
         self.external = True
     super(self.__class__, self).__init__(
         ffi,
         lib,
         handle=handle,
         match=ffi.typeof(lib.flux_msg_create).result,
         prefixes=[
             'flux_msg_',
             'FLUX_MSG',
         ],
     )