MCPcopy Create free account
hub / github.com/antlr/codebuff / lock

Method lock

output/java_guava/1.4.19/Striped.java:208–215  ·  view source on GitHub ↗

Creates a Striped with eagerly initialized, strongly referenced locks. Every lock is reentrant. @param stripes the minimum number of stripes (locks) required @return a new Striped

(int stripes)

Source from the content-addressed store, hash-verified

206
207
208 public static Striped<Lock> lock(int stripes) {
209 return new CompactStriped<Lock>(stripes, new Supplier<Lock>() {
210 @Override
211 public Lock get() {
212 return new PaddedLock();
213 }
214 });
215 }
216
217 /**
218 * Creates a {@code Striped<Lock>} with lazily initialized, weakly referenced locks. Every lock is

Callers 15

enterMethod · 0.45
enterIfMethod · 0.45
getWaitQueueLengthMethod · 0.45
runMethod · 0.45
runMethod · 0.45
rescheduleMethod · 0.45
cancelMethod · 0.45
isCancelledMethod · 0.45
putMethod · 0.45
replaceMethod · 0.45
removeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected