thread examples work as expected