Added ScopedThread snippet