Two level thread locking allowing interactive commands to be processed live