Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strict guarantees for Close #24

Open
kamilsk opened this issue Feb 11, 2021 · 0 comments
Open

strict guarantees for Close #24

kamilsk opened this issue Feb 11, 2021 · 0 comments

Comments

@kamilsk
Copy link
Member

kamilsk commented Feb 11, 2021

see the context package

package main

import (
	"fmt"
	"context"
)

func main() {
	ctx, cancel := context.WithCancel(context.TODO())
	cancel()
	
	if ctx.Err() == nil {
		panic("not strict guarantees")
	}
	
	fmt.Println("strict guarantees")
}

I need the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant