1 # SPDX-License-Identifier: MIT
3 # Copyright (c) 2019 Philippe Proulx <pproulx@efficios.com>
5 from bt2
import error
as bt2_error
6 from bt2
import object as bt2_object
7 from bt2
import native_bt
10 class Interrupter(bt2_object
._SharedObject
):
13 native_bt
.interrupter_get_ref(ptr
)
17 native_bt
.interrupter_put_ref(ptr
)
20 ptr
= native_bt
.interrupter_create()
23 raise bt2_error
._MemoryError
("cannot create interrupter object")
29 return bool(native_bt
.interrupter_is_set(self
._ptr
))
35 native_bt
.interrupter_set(self
._ptr
)
38 native_bt
.interrupter_reset(self
._ptr
)
This page took 0.036668 seconds and 4 git commands to generate.