func (c *Custodian) Register(id string, data interface{}) {
	obj := &custody{
		id:       id,
		data:     data,
		deadline: time.Now().Add(c.timeout),
	}
	c.lock.Lock()
	defer c.lock.Unlock()
	c.requests[obj.id] = obj
	c.seq = append(c.seq, obj)
	if len(c.seq) == 1 {
		c.resetTimer()
	}
}
// Register enqueues a new object to the custodian.  The data object
// is referred to by id.
Register enqueues a new object to the custodian.  The data object
is referred to by id.
// Register enqueues a new object to the custodian . The data object // is referred to by id .
func (c *Custodian) Register(id string, data interface{}) {
	obj := &custody{
		id:       id,
		data:     data,
		deadline: time.Now().Add(c.timeout),
	}
	c.lock.Lock()
	defer c.lock.Unlock()
	c.requests[obj.id] = obj
	c.seq = append(c.seq, obj)
	if len(c.seq) == 1 {
		c.resetTimer()
	}
}
func ( c * Custodian ) Register ( id string , data interface { } ) { obj := & custody { id : id , data : data , deadline : time . Now ( ) . Add ( c . timeout ) , } c . lock . Lock ( ) defer c . lock . Unlock ( ) c . requests [ obj . id ] = obj c . seq = append ( c . seq , obj ) if len ( c . seq ) == 1 { c . resetTimer ( ) } }
Register enqueues a new object to the custodian.
Register enqueues a new object to the custodian .