Use a mutex inside PutJob()

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>