The locking gets pretty hard when two sets are used. This is my attempt to describe the limitations.
Basically, it comes down to this: When any operation with two sets is used, each is used in a way that is valid at one point during the function call and that one view on the set is used for the remainder of the operation.
A harder guarantee - using a view on both sets both taken at the exact same time - is probably rather deadlock prone.