From 657b781f2f29e2076ee7aa5c4458cf68f467ab7e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 15 Aug 2020 03:14:06 +0100 Subject: [PATCH] add some comments about the async dataserver async action --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 1 - .../Shared/Api/Implementation/Plugins/Dataserver.cs | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 090d6be1ee..09a7635852 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4965,7 +4965,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.PassTouches = false; } - // THIS IS WRONG, must be async public LSL_Key llRequestAgentData(string id, int data) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs index 39982aaa05..9fbcde1af8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs @@ -82,6 +82,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins public Action action; } + // action, if provided, is executed async + // its code pattern should be: + //Action act = eventID => + //{ + // need operations to get reply string + // m_AsyncCommands.DataserverPlugin.DataserverReply(eventID, reply); + //} + // eventID is the event id, provided by this on Invoque + // see ProcessActions below + public UUID RegisterRequest(uint localID, UUID itemID, string identifier, Action action = null) {