If I call an async function multiple times that is changing the state of memory will I need a lock. e.g. If I am calling fs.writeFile multiple times in my code like
fs.writeFile('test.txt', 'data', function(err){});
fs.writeFile('test.txt', 'data', function(err){});
how will I ensure that there are no synchronization issues? Are there any locking mechanism?