Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2012-11-12 22:47:31 +0400
committerAtsushi Eno <atsushieno@veritas-vos-liberabit.com>2012-11-12 22:52:17 +0400
commitd1174f3f8979321a9182925df460e07e08157b41 (patch)
treed16fb2fc191bf68ff0e2aac600adf71aba8cad01 /Rx.NET/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs
parentd90a52595e24b1216c89f6cb5f245262db1810ae (diff)
partial import of ca05fdeb565e: Reactive Extensions OSS V1.0
Diffstat (limited to 'Rx.NET/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs')
-rw-r--r--Rx.NET/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Rx.NET/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs b/Rx.NET/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs
new file mode 100644
index 0000000..825a748
--- /dev/null
+++ b/Rx.NET/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System.Reactive.Disposables;
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// Scheduler with support for running periodic tasks.
+ /// This type of scheduler can be used to run timers more efficiently instead of using recursive scheduling.
+ /// </summary>
+ public interface ISchedulerPeriodic
+ {
+ /// <summary>
+ /// Schedules a periodic piece of work.
+ /// </summary>
+ /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
+ /// <param name="state">Initial state passed to the action upon the first iteration.</param>
+ /// <param name="period">Period for running the work periodically.</param>
+ /// <param name="action">Action to be executed, potentially updating the state.</param>
+ /// <returns>The disposable object used to cancel the scheduled recurring action (best effort).</returns>
+ IDisposable SchedulePeriodic<TState>(TState state, TimeSpan period, Func<TState, TState> action);
+ }
+}