I’ve made error in my suggestion, sorry about that. What I really wanted to say is:
it would be nice if ‘exec’ command had new setting which allows to set lock for synchronizing jobs performed on same set of files.
Consider example case:
I have 3 commands ‘exec’ executed in row, each command is same executable but executed with different parameters, each command modifies my project files:
my_lock = threading.Lock()
self.window.run_command('exec', {
'cmd': ('do_long_file_operation', param_a),
'lock': my_lock
})
self.window.run_command('exec', {
'cmd': ('do_long_file_operation', param_b),
'lock': my_lock
})
self.window.run_command('exec', {
'cmd': ('do_long_file_operation', param_c),
'lock': my_lock
})
In this situation lock would prevent changing my files in bad order and damaging them in process.