Avoids manual memory management. Uses `shared_ptr` instead of `unique_ptr` because we store references to the current thread in a backup variable. Simplifies the private thread `is_secondary` semantics by providing a backup storage for the current thread instead of a boolean value with a contract to manage the backup separately.
4.4 KiB
4.4 KiB