-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replace
AsyncResolve
with IntoFuture
, SyncResolve
wit…
…h `Wait`, and deprecate old API
- Loading branch information
Showing
82 changed files
with
1,146 additions
and
1,278 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use zenoh::prelude::r#async::*; | ||
use zenoh::prelude::*; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
|
@@ -94,7 +94,6 @@ async fn run() -> ZResult<()> { | |
let _async_alloc = buffer_layout | ||
.alloc() | ||
.with_policy::<BlockOn>() | ||
.res_async() | ||
.await | ||
.unwrap(); | ||
|
||
|
@@ -120,9 +119,9 @@ async fn run() -> ZResult<()> { | |
sbuf[0..8].fill(0); | ||
|
||
// Declare Session and Publisher (common code) | ||
let session = zenoh::open(Config::default()).res_async().await?; | ||
let publisher = session.declare_publisher("my/key/expr").res_async().await?; | ||
let session = zenoh::open(Config::default()).await?; | ||
let publisher = session.declare_publisher("my/key/expr").await?; | ||
|
||
// Publish SHM buffer | ||
publisher.put(sbuf).res_async().await | ||
publisher.put(sbuf).await | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh::prelude::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
#[tokio::main] | ||
|
@@ -23,12 +23,12 @@ async fn main() { | |
let (config, key_expr) = parse_args(); | ||
|
||
println!("Opening session..."); | ||
let session = zenoh::open(config).res().await.unwrap(); | ||
let session = zenoh::open(config).await.unwrap(); | ||
|
||
println!("Deleting resources matching '{key_expr}'..."); | ||
session.delete(&key_expr).res().await.unwrap(); | ||
session.delete(&key_expr).await.unwrap(); | ||
|
||
session.close().res().await.unwrap(); | ||
session.close().await.unwrap(); | ||
} | ||
|
||
#[derive(clap::Parser, Clone, PartialEq, Eq, Hash, Debug)] | ||
|
Oops, something went wrong.