예제 #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)
예제 #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)
예제 #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)
예제 #4
0
파일: message.py 프로젝트: grondo/flux-core
 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)
예제 #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',
         ], )
예제 #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)
예제 #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',
         ],
     )