1 # SPDX-License-Identifier: MIT
3 # Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
5 from bt2
import native_bt
, object
9 class Interrupter(object._SharedObject
):
10 _get_ref
= staticmethod(native_bt
.interrupter_get_ref
)
11 _put_ref
= staticmethod(native_bt
.interrupter_put_ref
)
14 ptr
= native_bt
.interrupter_create()
17 raise bt2
._MemoryError('cannot create interrupter object')
23 return bool(native_bt
.interrupter_is_set(self
._ptr
))
29 native_bt
.interrupter_set(self
._ptr
)
32 native_bt
.interrupter_reset(self
._ptr
)
This page took 0.033351 seconds and 4 git commands to generate.