Good day!
Lock and Unlock functions are for internal usage only.
Some drivers do not allow make discovering and connecting (even connecting not sending) operations at the same time. To synchronize that there was added lock and unlock functions (the same functions was added for IrDA).
The sending operations are executing in parallel with discovering.