Adding parallel processing via ThreadPool
This commit is contained in:
@@ -8,29 +8,29 @@ public interface ILanguageSelectionStage
|
||||
/// Selects the default language for control usage. (English)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage DefaultLanguage();
|
||||
IThreadingStage DefaultLanguage();
|
||||
|
||||
/// <summary>
|
||||
/// Selects english as the default language for control labels.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage UseEnglish();
|
||||
IThreadingStage UseEnglish();
|
||||
|
||||
/// <summary>
|
||||
/// Selects german as the default language for control labels.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage UseGerman();
|
||||
IThreadingStage UseGerman();
|
||||
|
||||
/// <summary>
|
||||
/// Selects persian as the default language for control labels.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage UsePersian();
|
||||
IThreadingStage UsePersian();
|
||||
|
||||
/// <summary>
|
||||
/// Selects a custom language as the default language for control labels.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IBuildingStage Custom(Localization language);
|
||||
IThreadingStage Custom(Localization language);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace TelegramBotBase.Builder.Interfaces
|
||||
{
|
||||
public interface IThreadingStage
|
||||
{
|
||||
/// <summary>
|
||||
/// Uses one single thread for message loop. (Default)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IBuildingStage UseSingleThread();
|
||||
|
||||
/// <summary>
|
||||
/// Using the threadpool for managing requests.
|
||||
/// </summary>
|
||||
/// <param name="workerThreads">Number of concurrent working threads.</param>
|
||||
/// <param name="ioThreads">Number of concurrent I/O threads.</param>
|
||||
/// <returns></returns>
|
||||
public IBuildingStage UseThreadPool(int workerThreads = 2, int ioThreads = 1);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user