-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
|
||
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; |
There was a problem hiding this comment.
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
There was a problem hiding this 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>; |
There was a problem hiding this comment.
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>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
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. |
superseded by #33 |
No description provided.