aboutsummaryrefslogtreecommitdiff
path: root/VNLib.Plugins.Extensions.Loading/Events/IIntervalScheduleable.cs
blob: 1ab679c682f294a8400d1ce86d33252cee9cced4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System.Threading;
using System.Threading.Tasks;

using VNLib.Utils.Logging;

namespace VNLib.Plugins.Extensions.Loading.Events
{
    /// <summary>
    /// Exposes a type for asynchronous event schelueling
    /// </summary>
    public interface IIntervalScheduleable
    {
        /// <summary>
        /// A method that is called when the interval time has elapsed
        /// </summary>
        /// <param name="log">The plugin default log provider</param>
        /// <param name="cancellationToken">A token that may cancel an operations if the plugin becomes unloaded</param>
        /// <returns>A task that resolves when the async operation completes</returns>
        Task OnIntervalAsync(ILogProvider log, CancellationToken cancellationToken);
    }
}