Slide 20
Slide 20 text
• ctx͕ऴྃͨ͠ͱ͖ʹొͨؔ͠fΛ࣮ߦ͢Δ
• Multiple calls to AfterFunc on a context operate independently; one does not replace another.
(ུ) The stop function does not wait for f to complete before returning. If the caller needs to
know whether f is completed, it must coordinate with f explicitly.
• Ref: https://github.com/golang/go/blob/adbfb672ba485630d75f8b5598228a63f4af08a4/src/
context/context.go#L297-L314
•
20
ݴޠػೳඪ४ύοέʔδʹ͋ΔΫϦʔϯΞοϓػߏ
func AfterFunc(ctx Context, f func()) (stop func() bool)