summaryrefslogtreecommitdiffstats
path: root/libdimension-python
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension-python')
-rw-r--r--libdimension-python/dimension.pxd1
-rw-r--r--libdimension-python/dimension.pyx3
2 files changed, 4 insertions, 0 deletions
diff --git a/libdimension-python/dimension.pxd b/libdimension-python/dimension.pxd
index 4df0786..fb02fbd 100644
--- a/libdimension-python/dimension.pxd
+++ b/libdimension-python/dimension.pxd
@@ -72,6 +72,7 @@ cdef extern from "../libdimension/dimension.h":
int dmnsn_future_join(dmnsn_future *future) nogil
void dmnsn_future_cancel(dmnsn_future *future)
double dmnsn_future_progress(dmnsn_future *future)
+ bint dmnsn_future_is_done(dmnsn_future *future)
void dmnsn_future_wait(dmnsn_future *future, double progress) nogil
void dmnsn_future_pause(dmnsn_future *future) nogil
void dmnsn_future_resume(dmnsn_future *future)
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx
index 7b6619f..98fc41d 100644
--- a/libdimension-python/dimension.pyx
+++ b/libdimension-python/dimension.pyx
@@ -85,6 +85,9 @@ cdef class Future:
def progress(self):
self._assert_unfinished()
return dmnsn_future_progress(self._future)
+ def is_done(self):
+ self._assert_unfinished()
+ return dmnsn_future_is_done(self._future)
def wait(self, double progress):
self._assert_unfinished()