Contents
Class Parker
java.lang.Object
org.cojen.tupl.util.Parker
Alternative to directly using LockSupport for parking and unparking threads, which is much
faster when threads are parked briefly.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Park after checking while spinning and yielding, to avoid putting the thread to sleep.static void
Park after checking while spinning and yielding, to avoid putting the thread to sleep.static void
parkNanosNow
(Object blocker, long nanos) Park without performing more checks than necessary.static void
Park without performing more checks than necessary.static void
-
Method Details
-
unpark
-
park
Park after checking while spinning and yielding, to avoid putting the thread to sleep. -
parkNow
Park without performing more checks than necessary. Should be used when caller has already performed checks to determine that parking is necessary. -
parkNanos
Park after checking while spinning and yielding, to avoid putting the thread to sleep. -
parkNanosNow
Park without performing more checks than necessary. Should be used when caller has already performed checks to determine that parking is necessary.
-