def gil_ensure(self):
    '\n        Ensure the GIL is acquired.\n        The returned value must be consumed by gil_release().\n        '
    gilptrty = Type.pointer(self.gil_state)
    fnty = Type.function(Type.void(), [gilptrty])
    fn = self._get_function(fnty, 'numba_gil_ensure')
    gilptr = cgutils.alloca_once(self.builder, self.gil_state)
    self.builder.call(fn, [gilptr])
    return gilptr
Ensure the GIL is acquired.
The returned value must be consumed by gil_release().
def gil_ensure(self):
    '\n        Ensure the GIL is acquired.\n        The returned value must be consumed by gil_release().\n        '
    gilptrty = Type.pointer(self.gil_state)
    fnty = Type.function(Type.void(), [gilptrty])
    fn = self._get_function(fnty, 'numba_gil_ensure')
    gilptr = cgutils.alloca_once(self.builder, self.gil_state)
    self.builder.call(fn, [gilptr])
    return gilptr