public void Cancel()
 {
     BackpressureHelper.SetTerminated(ref state);
     d.Dispose();
 }