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

Move zenhack.net/go/util into go-capnp repository #547

Merged
merged 41 commits into from
Oct 7, 2023

Conversation

alrs
Copy link
Contributor

@alrs alrs commented Oct 5, 2023

This merges the code from https://zenhack.net/go/util into a package called util. By merging instead of copying @zenhack's commit history is preserved.

zenhack and others added 30 commits October 4, 2023 19:46
...just for 100% test coverage; this is maybe a little gratuitous but
meh.
This is basically a go-accented "Result" type.
...for more complex synchronization patterns than can be accommodated by
With, which unfortunately go-capnp has a few of.
...which I found myself needing.
Inspired by the way Client refcounting works in go-capnp.

Needs docs & tests still.
I'm not quite sure how the interfaces fit in yet, and Releaser feels
wrong given Ref takes a separate callback. Easier to add than remove.
These feel more natural to me, despite being redundant with the package
names.
...by adding strings indicating what we're checking.
zenhack and others added 11 commits October 4, 2023 19:48
Right now just contains a Queue type that is based on the releaseList
type in go-capnp's rpc package, factored out for use elsewhere.

WIP; needs docs & tests still.
See the comment. I'm finding I need something like this for cases where
the release function needs to operate on a value at a particular
address.
...I find myself writing these three lines of code often enough when
debugging that it seemed worth doing this once and for all.
@alrs alrs mentioned this pull request Oct 5, 2023
@lthibault lthibault merged commit 0a6a8fc into capnproto:main Oct 7, 2023
0 of 4 checks passed
davidhubbard added a commit to davidhubbard/go-capnp-46 that referenced this pull request Oct 9, 2023
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.

3 participants