func (e *entry) makeFuture(fc *FCache) *Future {
	// Make a channel if we're not completed
	var resultChan chan Entry
	var cookie uint64
	if e.content == nil {
		resultChan = make(chan Entry, 1)
		cookie = atomic.AddUint64(&reqCounter, 1)
		if e.reqs == nil {
			e.reqs = map[uint64]chan<- Entry{}
		}
		e.reqs[cookie] = resultChan
	}

	return &Future{
		fc:     fc,
		ent:    e,
		result: resultChan,
		cookie: cookie,
	}
}
// makeFuture constructs a Future from the entry.
makeFuture constructs a Future from the entry.
// makeFuture constructs a Future from the entry .
func (e *entry) makeFuture(fc *FCache) *Future {
	var resultChan chan Entry
	var cookie uint64
	if e.content == nil {
		resultChan = make(chan Entry, 1)
		cookie = atomic.AddUint64(&reqCounter, 1)
		if e.reqs == nil {
			e.reqs = map[uint64]chan<- Entry{}
		}
		e.reqs[cookie] = resultChan
	}
	return &Future{
		fc:     fc,
		ent:    e,
		result: resultChan,
		cookie: cookie,
	}
}
func ( e * entry ) makeFuture ( fc * FCache ) * Future { var resultChan chan Entry var cookie uint64 if e . content == nil { resultChan = make ( chan Entry , 1 ) cookie = atomic . AddUint64 ( & reqCounter , 1 ) if e . reqs == nil { e . reqs = map [ uint64 ] chan <- Entry { } } e . reqs [ cookie ] = resultChan } return & Future { fc : fc , ent : e , result : resultChan , cookie : cookie , } }
makeFuture constructs a Future from the entry.
makeFuture constructs a Future from the entry .
// Make a channel if we're not completed