Rewrite Bot-Utils so that handlers are threaded

Tiny fix in INIReader
This commit is contained in:
2018-09-11 07:59:10 +00:00
parent a7c0a8906a
commit 6d412593f6
5 changed files with 15 additions and 5 deletions
+9
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using BlubbFish.Utils.IoT.Bots.Events;
namespace BlubbFish.Utils.IoT.Bots.Moduls {
@@ -49,6 +50,14 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
public virtual void SetInterconnection(String param, Action<Object> hook, Object data) { }
public abstract void EventLibSetter();
protected abstract void LibUpadteThread(Object state);
protected void HandleLibUpdate(Object sender, EventArgs e) {
ThreadPool.QueueUserWorkItem(this.LibUpadteThread, e);
}
public abstract void Dispose();
public void SetConfig(Dictionary<String, Dictionary<String, String>> newconf) {