algo itself Thread-safe