File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use crate::endpoint::ContextInternal;
2
2
use restate_sdk_shared_core:: NotificationHandle ;
3
3
4
4
// Sealed future trait, used by select statement
5
+ #[ doc( hidden) ]
5
6
pub trait SealedDurableFuture {
6
7
fn inner_context ( & self ) -> ContextInternal ;
7
8
fn handle ( & self ) -> NotificationHandle ;
Original file line number Diff line number Diff line change
1
+ // Thanks tokio for the help!
2
+ // https://github.com/tokio-rs/tokio/blob/a258bff7018940b438e5de3fb846588454df4e4d/tokio/src/macros/select.rs
3
+ // MIT License
4
+
1
5
/// Select macro, alike tokio::select:
2
6
///
3
7
/// ```rust
Original file line number Diff line number Diff line change @@ -106,7 +106,10 @@ impl VirtualObjectCommandInterpreter for VirtualObjectCommandInterpreterImpl {
106
106
Command :: AwaitAnySuccessful { .. } => Err ( anyhow ! (
107
107
"AwaitAnySuccessful is currently unsupported in the Rust SDK"
108
108
) ) ?,
109
- Command :: AwaitAwakeableOrTimeout { awakeable_key, timeout_millis } => {
109
+ Command :: AwaitAwakeableOrTimeout {
110
+ awakeable_key,
111
+ timeout_millis,
112
+ } => {
110
113
let ( awakeable_id, awk_fut) = context. awakeable :: < String > ( ) ;
111
114
context. set :: < String > ( & format ! ( "awk-{awakeable_key}" ) , awakeable_id) ;
112
115
@@ -118,7 +121,7 @@ impl VirtualObjectCommandInterpreter for VirtualObjectCommandInterpreterImpl {
118
121
Err ( TerminalError :: new( "await-timeout" ) )
119
122
}
120
123
} ?;
121
- } ,
124
+ }
122
125
Command :: AwaitOne { command } => {
123
126
last_result = match command {
124
127
AwaitableCommand :: CreateAwakeable { awakeable_key } => {
You can’t perform that action at this time.
0 commit comments