Updated basic thread example