Documentation Home

Exchanges any read-side critical sections associated with lhs and rhs.

namespace jss{
    void swap(rcu_reader& lhs,rcu_reader& rhs);
}

Effects:

As if: lhs.swap(rhs)

void rcu_reader::swap(rcu_reader& other);

Effects:

*this is associated with the read-side critical section (if any) associated with other prior to the invocation. other is associated with the read-side critical section (if any) associated with *this prior to the invocation.

Requires:

If either of *this or other have an associated read-side critical section prior to the invocation, those read-side critical sections must have started on the same thread as the invocation of swap.

Throws:

Nothing.

Synchronization:

None.

See Also