#IMPROVEMENT: Replaced lock by Interlocked to exit sync thread if already another one is running
Authored by: floriwan 2013-05-29
Parent: [r333]
Child: [r335]