Sync lock

Hi Laurent

What's the purpose of sync lock? I have always assumed it's to prevent 2 clients from synchronizing at the same time and causing race conditions, but having read the code I realized it's not the case. The only thing this mechanism does, it seems, it to prevent a client from running 2 syncs in parallel, is that right?

I was going to write an explanation but then I remembered there's a spec about it: joplin/ at dev · laurent22/joplin · GitHub You should find all the info in there but if not let me know.

Sure, I saw this. It explains how it works but I do not think it explains why, i.e. the motivation for sync lock in particular. I can understand the need for exclusive lock.