July 2017
Beginner to intermediate
358 pages
10h 54m
English
The WithDeadline method returns a copy of the parent context that expires after the current time is greater than deadline. At this point, the context's Done channel is closed and the resources associated are released. It also passes back a CancelFunc method that allows manual cancellation of the context:
func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc)
Read now
Unlock full access