hi,

that really depends on what you are doing.
There's different type of lock for different cases and scenario.

That also depends on what you care first, speed or memory.

but the manual is pretty easy to understand, just pass the lock as a reference to your lambda function and you should be good to go.

Cheers,
Manuel