diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-05-06 22:58:09 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-05-06 23:39:16 +0200 |
| commit | 124de0785901f1182bb55b34c03c6370bd511043 (patch) | |
| tree | efd26b5c9a031dd8931182052826767b76af6740 /vis.h | |
| parent | 0bd23565ac85f7ab158e256b567c94bbdb7a148b (diff) | |
| download | vis-124de0785901f1182bb55b34c03c6370bd511043.tar.gz vis-124de0785901f1182bb55b34c03c6370bd511043.tar.xz | |
vis: add vis_interrupt{,requested} functions
Diffstat (limited to 'vis.h')
| -rw-r--r-- | vis.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -153,6 +153,18 @@ void vis_resume(Vis*); */ bool vis_signal_handler(Vis*, int signum, const siginfo_t *siginfo, const void *context); /** + * Interrupt long running operation. + * @rst + * .. warning:: There is no guarantee that a long running operation is actually + * interrupted. It is analogous to cooperative multitasking where + * the operation has to voluntarily yield control. + * .. note:: It is invoked from `vis_signal_handler` when receiving ``SIGINT``. + * @endrst + */ +void vis_interrupt(Vis*); +/** Check whether interruption was requested. */ +bool vis_interrupt_requested(Vis*); +/** * @} * @defgroup vis_draw * @{ |
