summaryrefslogtreecommitdiff
path: root/man/sd_bus_slot_set_floating.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-06 11:07:02 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-06 23:01:57 +0200
commitfa17b4e8d93c715793e35242829b33fef54bddea (patch)
tree714dbc997b8217ccdeadf1964e2a4a8846b2f810 /man/sd_bus_slot_set_floating.xml
parente3736e02231dd71b6674091b4db79e2dee800bca (diff)
downloadsystemd-fa17b4e8d93c715793e35242829b33fef54bddea.tar.gz
bus: optionally call a callbacks for cleanup
This adds a function sd_bus_slot_set_destroy_callback() to set a function which can free userdata or perform other cleanups. sd_bus_slot_get_destory_callback() queries the callback, and is included for completeness. Without something like this, for floating asynchronous callbacks, which might be called or not, depending on the sequence of events, it's hard to perform resource cleanup. The alternative would be to always perform the cleanup from the caller too, but that requires more coordination and keeping of some shared state. It's nicer to keep the cleanup contained between the callback and the function that requests the callback.
Diffstat (limited to 'man/sd_bus_slot_set_floating.xml')
-rw-r--r--man/sd_bus_slot_set_floating.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/man/sd_bus_slot_set_floating.xml b/man/sd_bus_slot_set_floating.xml
index cae1f5353c..650b56f8c2 100644
--- a/man/sd_bus_slot_set_floating.xml
+++ b/man/sd_bus_slot_set_floating.xml
@@ -110,6 +110,7 @@
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sd_bus_slot_set_destroy_callback</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>