Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd735d7b

Browse files
stepanchegslandelle
authored andcommitted
Implement toString for non-blocking semaphores (AsyncHttpClient#1376)
1 parent049aa9d commitd735d7b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

‎client/src/main/java/org/asynchttpclient/netty/channel/NonBlockingSemaphore.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,10 @@ public boolean tryAcquire() {
4545
}
4646
}
4747
}
48+
49+
@Override
50+
publicStringtoString() {
51+
// mimic toString of Semaphore class
52+
returnsuper.toString() +"[Permits = " +permits +"]";
53+
}
4854
}

‎client/src/main/java/org/asynchttpclient/netty/channel/NonBlockingSemaphoreInfinite.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,9 @@ public void release() {
3131
publicbooleantryAcquire() {
3232
returntrue;
3333
}
34+
35+
@Override
36+
publicStringtoString() {
37+
returnNonBlockingSemaphore.class.getName();
38+
}
3439
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp