public void Set(TResult result) { if (m_Set) { throw new InvalidOperationException("already set result"); } m_Set = true; m_Result = result; m_Entry.Close(); }