code: func WaitForBlob(storage interface{}, deadline time.Time, blobs []blob.Ref) {
  	hub := GetHub(storage)
  	ch := make(chan blob.Ref, 1)
  	if len(blobs) == 0 {
  		hub.RegisterListener(ch)
  		defer hub.UnregisterListener(ch)
  	}
  	for _, br := range blobs {
  		hub.RegisterBlobListener(br, ch)
  		defer hub.UnregisterBlobListener(br, ch)
  	}
  	var tc <-chan time.Time
  	if !canLongPoll {
  		tc = time.After(2 * time.Second)
  	}
  
  	t := time.NewTimer(time.Until(deadline))
  	defer t.Stop()
  
  	select {
  	case <-ch:
  	case <-tc:
  	case <-t.C:
  	}
  }
docs: // WaitForBlob waits until deadline for blobs to arrive. If blobs is empty, any
  // blobs are waited on.  Otherwise, those specific blobs are waited on.
  // When WaitForBlob returns, nothing may have happened.