We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66b1366 commit dba2382Copy full SHA for dba2382
examples/bench-multi-thread.rs
@@ -17,7 +17,6 @@ async fn main() -> Result<()> {
17
} else {
18
local.run_until(server()).await;
19
}
20
- Ok(())
21
22
23
async fn client(server_addr: String) -> ! {
@@ -72,7 +71,7 @@ async fn server() -> ! {
72
71
loop {
73
ep.worker().tag_recv(tag, &mut buf).await.unwrap();
74
// ep.tag_send(tag, &[0]).await;
75
- unsafe { *(&*counter as *const AtomicUsize as *mut usize) += 1 };
+ counter.fetch_add(1, Ordering::Relaxed);
76
77
});
78
examples/bench.rs
@@ -12,7 +12,6 @@ async fn main() -> Result<()> {
12
13
14
15
16
0 commit comments