Add cpp thread snippets