Skip to content

Commit 15e4977

Browse files
author
Stjepan Glavina
committed
Bump to v1.1.3
1 parent 30e4615 commit 15e4977

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
# version 1.1.2
1+
# Version 1.1.3
2+
3+
- Update dependencies.
4+
5+
# Version 1.1.2
26

37
- Fix a deadlock issue.
48

5-
# version 1.1.1
9+
# Version 1.1.1
610

711
- Fix some typos.
812

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-lock"
3-
version = "1.1.2"
3+
version = "1.1.3"
44
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
55
edition = "2018"
66
description = "Reference-counted async lock"
@@ -13,8 +13,8 @@ categories = ["asynchronous", "concurrency"]
1313
readme = "README.md"
1414

1515
[dependencies]
16-
event-listener = "1.2.0"
16+
event-listener = "2.0.0"
1717

1818
[dev-dependencies]
19-
smol = "0.1.10"
19+
smol = "0.1.18"
2020
futures = "0.3.5"

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl<T> Lock<T> {
152152
_ => {
153153
// Notify the first listener in line because we probably received a
154154
// notification that was meant for a starved task.
155-
self.0.lock_ops.notify_one();
155+
self.0.lock_ops.notify(1);
156156
break;
157157
}
158158
}
@@ -190,7 +190,7 @@ impl<T> Lock<T> {
190190
// Lock is available.
191191
_ => {
192192
// Be fair: notify the first listener and then go wait in line.
193-
self.0.lock_ops.notify_one();
193+
self.0.lock_ops.notify(1);
194194
}
195195
}
196196

@@ -287,7 +287,7 @@ impl<T> Drop for LockGuard<T> {
287287
fn drop(&mut self) {
288288
// Remove the last bit and notify a waiting lock operation.
289289
(self.0).0.state.fetch_sub(1, Ordering::Release);
290-
(self.0).0.lock_ops.notify_one();
290+
(self.0).0.lock_ops.notify(1);
291291
}
292292
}
293293

0 commit comments

Comments
 (0)