476 * Starts a thread in the given ThreadContainer.
477 */
478 void start(Thread thread, ThreadContainer container);
479
480 /**
481 * Returns the top of the given thread's stackable scope stack.
482 */
483 StackableScope headStackableScope(Thread thread);
484
485 /**
486 * Sets the top of the current thread's stackable scope stack.
487 */
488 void setHeadStackableScope(StackableScope scope);
489
490 /**
491 * Returns the Thread object for the current platform thread. If the
492 * current thread is a virtual thread then this method returns the carrier.
493 */
494 Thread currentCarrierThread();
495
496 /**
497 * Executes the given value returning task on the current carrier thread.
498 */
499 <V> V executeOnCarrierThread(Callable<V> task) throws Exception;
500
501 /**
502 * Returns the value of the current carrier thread's copy of a thread-local.
503 */
504 <T> T getCarrierThreadLocal(CarrierThreadLocal<T> local);
505
506 /**
507 * Sets the value of the current carrier thread's copy of a thread-local.
508 */
509 <T> void setCarrierThreadLocal(CarrierThreadLocal<T> local, T value);
510
511 /**
512 * Removes the value of the current carrier thread's copy of a thread-local.
513 */
514 void removeCarrierThreadLocal(CarrierThreadLocal<?> local);
515
516 /**
517 * Returns {@code true} if there is a value in the current carrier thread's copy of
518 * thread-local, even if that values is {@code null}.
519 */
520 boolean isCarrierThreadLocalPresent(CarrierThreadLocal<?> local);
|
476 * Starts a thread in the given ThreadContainer.
477 */
478 void start(Thread thread, ThreadContainer container);
479
480 /**
481 * Returns the top of the given thread's stackable scope stack.
482 */
483 StackableScope headStackableScope(Thread thread);
484
485 /**
486 * Sets the top of the current thread's stackable scope stack.
487 */
488 void setHeadStackableScope(StackableScope scope);
489
490 /**
491 * Returns the Thread object for the current platform thread. If the
492 * current thread is a virtual thread then this method returns the carrier.
493 */
494 Thread currentCarrierThread();
495
496 /**
497 * Returns the value of the current carrier thread's copy of a thread-local.
498 */
499 <T> T getCarrierThreadLocal(CarrierThreadLocal<T> local);
500
501 /**
502 * Sets the value of the current carrier thread's copy of a thread-local.
503 */
504 <T> void setCarrierThreadLocal(CarrierThreadLocal<T> local, T value);
505
506 /**
507 * Removes the value of the current carrier thread's copy of a thread-local.
508 */
509 void removeCarrierThreadLocal(CarrierThreadLocal<?> local);
510
511 /**
512 * Returns {@code true} if there is a value in the current carrier thread's copy of
513 * thread-local, even if that values is {@code null}.
514 */
515 boolean isCarrierThreadLocalPresent(CarrierThreadLocal<?> local);
|