Lock task to be able to run many process.
NOTE: it's not thread safe