How correlates context cancellation with explicit Close() method

Viewed 24

context.CancelFunc() vs. T.Close()

What is the rule of thumb when a Type created via New(ctx) has a method Close()? For graceful shutdown, is it enough to only call either cancel() or Close()? Both? In which order?

0 Answers
Related