summaryrefslogtreecommitdiffstats
path: root/vendor/jobserver/src/wasm.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /vendor/jobserver/src/wasm.rs
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.tar.xz
rustc-4f9fe856a25ab29345b90e7725509e9ee38a37be.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--vendor/jobserver/src/wasm.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/jobserver/src/wasm.rs b/vendor/jobserver/src/wasm.rs
index b88a9d952..3793bd67c 100644
--- a/vendor/jobserver/src/wasm.rs
+++ b/vendor/jobserver/src/wasm.rs
@@ -59,6 +59,11 @@ impl Client {
);
}
+ pub fn available(&self) -> io::Result<usize> {
+ let lock = self.inner.count.lock().unwrap_or_else(|e| e.into_inner());
+ Ok(*lock)
+ }
+
pub fn configure(&self, _cmd: &mut Command) {
unreachable!();
}