Esempio n. 1
0
 /** Bind the current thread to this reservable lock. */
 public void bind() {
   bind(false);
 }
Esempio n. 2
0
 /**
  * Assigning the current thread has a side effect of preventing the lock being used again until it
  * is released.
  *
  * @param bind whether to bind the thread as well
  * @param wholeCore whether to reserve all the thread in the same core.
  */
 final void assignCurrentThread(boolean bind, boolean wholeCore) {
   assignedThread = Thread.currentThread();
   if (bind) bind(wholeCore);
 }