Add graph cancellation API
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 11 May 2017 21:54:10 +0000 (17:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:42 +0000 (12:57 -0400)
commit202a3a1362bcff05d6e53afafe3d487c71b362d8
tree582e3aaf8da23188cedbf17d7cb74510d8e25306
parentb65cfd0f121db4ac742adeeb9e95515df9f584d6
Add graph cancellation API

With this API you can cancel a graph with bt_graph_cancel() and
check if a graph is canceled with bt_graph_is_canceled().

A canceled graph is used to indicate to a contained component or
notification iterator if it should retry or not when a system call is
interrupted. This exists mostly to support a clean termination when we
get SIGINT, but with debugger support (a system call is interrupted when
the debugger sends SIGCONT; in this case we need to retry the system
call).

Cancelling a graph also makes bt_graph_run() quit before the next
sink consuming iteration.

It is not allowed to run a canceled graph again. Once it is canceled,
it's dead for good.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/graph/graph-internal.h
include/babeltrace/graph/graph.h
lib/graph/graph.c
This page took 0.024051 seconds and 4 git commands to generate.