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

add some missing contexts on Dial, Login #1

Merged
merged 2 commits into from
Apr 30, 2023

Conversation

bradfitz
Copy link
Contributor

(If it does network operations or users might want timeouts or cancelation, it needs a context.)

(If it does network operations or users might want timeouts or
cancelation, it needs a context.)
@karalabe
Copy link
Owner

LGTM, but out of curiosity, do you think it might make sense to have out-of-the-box methods that hide the context, of should those always be in the APIs?

@karalabe
Copy link
Owner

Oh, and a more contributing style question, do you mind me pushing tiny nitpick fixes on top of a PR before merging? We usually do that when it just feels like a pointless back and forth to pinpoint something trivial only to wait half a world RTT to have it fixed before merging.

@bradfitz
Copy link
Contributor Author

Go for it.

As for context hiding: I'm not sure the doubled API bloat would be worth it. Also I'm so used to seeing context whenever there will be something slow or hitting the network that hiding it would weird me out at this point. That said, I'm not exactly sure what API you have in mind.

@karalabe
Copy link
Owner

I guess we should also expose the context to CustomCall?

@karalabe
Copy link
Owner

Though if you have a better API for that, feel free to suggest. It was just a wonky first-thought attempt to allow doing custom atproto calls. Haven't thought much about it thb.

@karalabe karalabe merged commit 32efb32 into karalabe:main Apr 30, 2023
@karalabe
Copy link
Owner

Merged it as is as I've figured the CustomCall allows you to use your own context from the outside within the closure so it's fine as is. That method should be a wildcard anyway so no problem if it's a bit wonky.

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

Successfully merging this pull request may close these issues.

2 participants