why this is considered Thread-Safe and match does not?