Skip to content

WIP change to use resources #28

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

Closed
wants to merge 1 commit into from
Closed

WIP change to use resources #28

wants to merge 1 commit into from

Conversation

ricochet
Copy link
Contributor

@ricochet ricochet commented Nov 3, 2023

No description provided.


write-body-sync: func(value: outgoing-value-body-sync) -> result<_, error>;
write-body-async: func() -> result<outgoing-value-body-async, error>;
}
type outgoing-value-body-async = output-stream;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More work is needed here to support streams correctly

Copy link
Collaborator

@Mossaka Mossaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is much cleaner

@@ -16,28 +16,28 @@ interface cache {

// The `get` operation returns the value passed by a previous `set` for the
// same key within the given TTL or none if there is no such value.
get: func(k: key) -> future-get-result;
get: func(k: key) -> borrow<future-get-result>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to return an owned future-get-result resource here for consuming?

@@ -46,14 +46,14 @@ interface cache {
// value is updated in-place. In the common case of computing and caching a
// value if the given key is not already in the cache, consider using
// `get-or-set` (below) intead of separate `get` and `set` operations.
set: func(k: key, v: outgoing-value, TTL-ms: option<u32>) -> future-result;
set: func(k: key, v: outgoing-value, TTL-ms: option<u32>) -> borrow<future-result>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above

@Mossaka
Copy link
Collaborator

Mossaka commented Dec 1, 2023

Hey @ricochet , I'd love to see this PR being merged. Is there anything blocking at the moment? I would like to offer help to move this forward.

@Mossaka
Copy link
Collaborator

Mossaka commented Jan 5, 2024

superseded by #33

@Mossaka Mossaka closed this Jan 5, 2024
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