Use Monitor for locking Stack and Counter

:lock: