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 ----------------------