Thread creation with function object example.