Skip to content

Commit

Permalink
📝 update heck to 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Apr 25, 2024
1 parent 5546621 commit 64dc965
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion may_rpc_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description = "RPC framework for Rust based on coroutine."
proc-macro = true

[dependencies]
heck = "0.4"
heck = "0.5"
quote = "1.0"
proc-macro2 = "1.0"
syn = { version = "2.0", features = ["full"] }
5 changes: 4 additions & 1 deletion src/conetty/queued_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ impl<W: Write> QueuedWriter<W> {
// only allow the first writer perform the write operation
// other concurrent writers would just push the data
if self.data_count.fetch_add(1, Ordering::AcqRel) == 0 {
// in any cases this should not block since we have only one writer
// it's possible that other writer is blocked by the lock
// e.g. the `write_all()` is blocked and data_count is 0
// and the next writer would try to acquire the lock
// this only relax the write lock contention
let mut writer = self.writer.lock().unwrap();

loop {
Expand Down

0 comments on commit 64dc965

Please sign in to comment.