func (f *Future) Channel() <-chan Entry {
	// If the future was canceled, return nil
	if f.canceled {
		return nil
	}

	// If the result channel exists, return it
	if f.result != nil {
		return f.result
	}

	// Lock the cache
	f.fc.Lock()
	defer f.fc.Unlock()

	// If there's no content, we can't synthesize a channel
	if f.ent.content == nil {
		return nil
	}

	// Synthesize a channel with the desired contents
	result := make(chan Entry, 1)
	result <- *f.ent.content
	close(result)
	return result
}
// Channel returns a channel that the caller may receive from to
// receive the result.
Channel returns a channel that the caller may receive from to
receive the result.
// Channel returns a channel that the caller may receive from to // receive the result .
func (f *Future) Channel() <-chan Entry {
	if f.canceled {
		return nil
	}
	if f.result != nil {
		return f.result
	}
	f.fc.Lock()
	defer f.fc.Unlock()
	if f.ent.content == nil {
		return nil
	}
	result := make(chan Entry, 1)
	result <- *f.ent.content
	close(result)
	return result
}
func ( f * Future ) Channel ( ) <- chan Entry { if f . canceled { return nil } if f . result != nil { return f . result } f . fc . Lock ( ) defer f . fc . Unlock ( ) if f . ent . content == nil { return nil } result := make ( chan Entry , 1 ) result <- * f . ent . content close ( result ) return result }
Channel returns a channel that the caller may receive from to
receive the result.
Channel returns a channel that the caller may receive from to receive the result .
// If the future was canceled, return nil // If the result channel exists, return it // Lock the cache // If there's no content, we can't synthesize a channel // Synthesize a channel with the desired contents