def close(self, callback=None):
        if self._close_called:
            return

        if callback:
            def cb_wrapper(uv_handle_t):
                callback(self)

                alive.remove(self)  # now safe to free resources
                self._ffi_cb = None
                self._ffi_close_cb = None
        else:
            cb_wrapper = functools.partial(default_close_cb, handle=self)

        self._ffi_close_cb = ffi.callback('void (*)(uv_handle_t *)', cb_wrapper)
        libuv.uv_close(self.uv_handle, self._ffi_close_cb)

        self._close_called = True
Close uv handle
dataset/ETHPy150Open veegee/guv/pyuv_cffi/__init__.py/Handle.close