From e61df5a371dd4e0d1f9ebdbcb199e13dd3a884e2 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 31 May 2021 08:05:04 -0500 Subject: [PATCH] doc --- documentation/sharedpv.rst | 2 ++ documentation/source.rst | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/documentation/sharedpv.rst b/documentation/sharedpv.rst index b74f88e..dc6ff2d 100644 --- a/documentation/sharedpv.rst +++ b/documentation/sharedpv.rst @@ -70,6 +70,8 @@ An example of a SharedPV with a custom Put handler pv.open(initial); +.. note:: SharedPV follows the Source rules for :ref:`sourcethreading` and locking. + .. doxygenstruct:: pvxs::server::SharedPV :members: diff --git a/documentation/source.rst b/documentation/source.rst index ed79c94..838d192 100644 --- a/documentation/source.rst +++ b/documentation/source.rst @@ -12,11 +12,16 @@ The `pvxs::server::Source` interface is a more general, and complex, means of al to respond to PV names as clients search for them. This may be necessary in specialized cases such as gateway, proxy, or bridge servers. +.. _sourcethreading: + Threading --------- -The `pvxs::server::Source::onSearch` and `pvxs::server::Source::onCreate` callbacks may be invoked concurrently. -All callbacks stored through a `pvxs::server::ChannelControl` and related \*Op will be serialized. +A Server will invoke user callback functions from one or more internal worker threads. +However, it is guaranteed that callbacks relating to a given PV will never be executed concurrently. +This implies that callbacks for a single operation, +those stored through a `pvxs::server::ChannelControl` and related \*Op, +will also never be executed concurrently. Ownership and Lifetime ----------------------