Locking system added

Signed-off-by: Julien Blatecky <julien1619@gmail.com>