Add example for thread instantiation.