ScheduledThreadPoolExecutor.Schedule Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Schedule(IRunnable, Int64, TimeUnit) |
Creates and executes a one-shot action that becomes enabled after the given delay. |
| Schedule(ICallable, Int64, TimeUnit) |
Submits a value-returning one-shot task that becomes enabled after the given delay. |
Schedule(IRunnable, Int64, TimeUnit)
Creates and executes a one-shot action that becomes enabled after the given delay.
[Android.Runtime.Register("schedule", "(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_lang_Runnable_JLjava_util_concurrent_TimeUnit_Handler")]
public virtual Java.Util.Concurrent.IScheduledFuture? Schedule(Java.Lang.IRunnable? command, long delay, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("schedule", "(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_lang_Runnable_JLjava_util_concurrent_TimeUnit_Handler")>]
abstract member Schedule : Java.Lang.IRunnable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture
override this.Schedule : Java.Lang.IRunnable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture
Parameters
- command
- IRunnable
the task to execute
- delay
- Int64
the time from now to delay execution
- unit
- TimeUnit
the time unit of the delay parameter
Returns
a ScheduledFuture representing pending completion of the task and whose get() method will return null upon completion
Implements
- Attributes
Exceptions
Remarks
Submits a one-shot task that becomes enabled after the given delay.
Java reference for java.util.concurrent.ScheduledThreadPoolExecutor.schedule.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
Schedule(ICallable, Int64, TimeUnit)
Submits a value-returning one-shot task that becomes enabled after the given delay.
[Android.Runtime.Register("schedule", "(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_Handler")]
[Java.Interop.JavaTypeParameters(new System.String[] { "V" })]
public virtual Java.Util.Concurrent.IScheduledFuture? Schedule(Java.Util.Concurrent.ICallable? callable, long delay, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("schedule", "(Ljava/util/concurrent/Callable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;", "GetSchedule_Ljava_util_concurrent_Callable_JLjava_util_concurrent_TimeUnit_Handler")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "V" })>]
abstract member Schedule : Java.Util.Concurrent.ICallable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture
override this.Schedule : Java.Util.Concurrent.ICallable * int64 * Java.Util.Concurrent.TimeUnit -> Java.Util.Concurrent.IScheduledFuture
Parameters
- callable
- ICallable
the function to execute
- delay
- Int64
the time from now to delay execution
- unit
- TimeUnit
the time unit of the delay parameter
Returns
a ScheduledFuture that can be used to extract result or cancel
Implements
- Attributes
Remarks
Submits a value-returning one-shot task that becomes enabled after the given delay.
Java reference for java.util.concurrent.ScheduledThreadPoolExecutor.schedule.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.