2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00

AsyncReply thread safe

This commit is contained in:
2019-11-12 17:25:37 +03:00
parent 238ac2563b
commit 4f68c08640
3 changed files with 89 additions and 48 deletions

View File

@ -285,13 +285,15 @@ namespace Esiur.Net.IIP
void init()
{
queue.Then((x) =>
var q = queue;
q.Then((x) =>
{
if (x.Type == DistributedResourceQueueItem.DistributedResourceQueueItemType.Event)
x.Resource._EmitEventByIndex(x.Index, (object[])x.Value);
else
x.Resource._UpdatePropertyByIndex(x.Index, x.Value);
});
//q.timeout?.Dispose();
var r = new Random();
localNonce = new byte[32];