Package com.microej.crypto.test.util
Class EnsureAsync<T>
- java.lang.Object
-
- com.microej.crypto.test.util.EnsureAsync<T>
-
- Type Parameters:
T- Return type for the decorated callable
- All Implemented Interfaces:
java.util.concurrent.Callable<T>
public class EnsureAsync<T> extends java.lang.Object implements java.util.concurrent.Callable<T>Decorator for Callable ensuring that the decorated interface runs in a way that let the VM run other green threads.Use "com.microej.crypto.test.ensureasync.thresholdms" to configure the threshold (in milliseconds): execution under this threshold are not required to have yield execution to other threads.
Defaults to 30L.
Set to0to disable the check.
-
-
Field Summary
Fields Modifier and Type Field Description static longTHRESHOLD_MS_DEFAULTstatic java.lang.StringTHRESHOLD_MS_PROPERTY
-
Constructor Summary
Constructors Constructor Description EnsureAsync(java.util.concurrent.Callable<T> decorated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcall()
-
-
-
Field Detail
-
THRESHOLD_MS_PROPERTY
public static final java.lang.String THRESHOLD_MS_PROPERTY
- See Also:
- Constant Field Values
-
THRESHOLD_MS_DEFAULT
public static final long THRESHOLD_MS_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EnsureAsync
public EnsureAsync(java.util.concurrent.Callable<T> decorated)
-
-