added world and queue thread locking