Label all threadpool calls being made in core OpenSimulator. This is to add problem diagnosis.

"show threadpool calls" now also returns named (labelled), anonymous (unlabelled) and total call stats.
mb-throttle-test
Justin Clark-Casey (justincc) 2014-11-04 00:55:48 +00:00
parent 72cb1cc7d6
commit ec8d21c434
30 changed files with 103 additions and 65 deletions

View File

@ -483,7 +483,7 @@ namespace OpenSim.Framework.Communications
/// In case, we are invoked asynchroneously this object will keep track of the state /// In case, we are invoked asynchroneously this object will keep track of the state
/// </summary> /// </summary>
AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state); AsyncResult<Stream> ar = new AsyncResult<Stream>(callback, state);
Util.FireAndForget(RequestHelper, ar); Util.FireAndForget(RequestHelper, ar, "RestClient.BeginRequest");
return ar; return ar;
} }

View File

@ -365,13 +365,21 @@ namespace OpenSim.Framework.Servers
{ {
List<KeyValuePair<string, int>> calls = Util.GetFireAndForgetCallsMade().ToList(); List<KeyValuePair<string, int>> calls = Util.GetFireAndForgetCallsMade().ToList();
calls.Sort((kvp1, kvp2) => kvp2.Value.CompareTo(kvp1.Value)); calls.Sort((kvp1, kvp2) => kvp2.Value.CompareTo(kvp1.Value));
int namedCallsMade = 0;
ConsoleDisplayList cdl = new ConsoleDisplayList(); ConsoleDisplayList cdl = new ConsoleDisplayList();
foreach (KeyValuePair<string, int> kvp in calls) foreach (KeyValuePair<string, int> kvp in calls)
{ {
cdl.AddRow(kvp.Key, kvp.Value); cdl.AddRow(kvp.Key, kvp.Value);
namedCallsMade += kvp.Value;
} }
cdl.AddRow("TOTAL NAMED", namedCallsMade);
long allCallsMade = Util.TotalFireAndForgetCallsMade;
cdl.AddRow("TOTAL ANONYMOUS", allCallsMade - namedCallsMade);
cdl.AddRow("TOTAL ALL", allCallsMade);
MainConsole.Instance.Output(cdl.ToString()); MainConsole.Instance.Output(cdl.ToString());
} }

View File

@ -1928,11 +1928,6 @@ namespace OpenSim.Framework
} }
} }
public static void FireAndForget(System.Threading.WaitCallback callback)
{
FireAndForget(callback, null, null);
}
public static void InitThreadPool(int minThreads, int maxThreads) public static void InitThreadPool(int minThreads, int maxThreads)
{ {
if (maxThreads < 2) if (maxThreads < 2)
@ -1978,7 +1973,6 @@ namespace OpenSim.Framework
} }
} }
/// <summary> /// <summary>
/// Additional information about threads in the main thread pool. Used to time how long the /// Additional information about threads in the main thread pool. Used to time how long the
/// thread has been running, and abort it if it has timed-out. /// thread has been running, and abort it if it has timed-out.
@ -2052,10 +2046,10 @@ namespace OpenSim.Framework
} }
} }
private static long nextThreadFuncNum = 0; private static long nextThreadFuncNum = 0;
private static long numQueuedThreadFuncs = 0; private static long numQueuedThreadFuncs = 0;
private static long numRunningThreadFuncs = 0; private static long numRunningThreadFuncs = 0;
private static long numTotalThreadFuncsCalled = 0;
private static Int32 threadFuncOverloadMode = 0; private static Int32 threadFuncOverloadMode = 0;
// Maps (ThreadFunc number -> Thread) // Maps (ThreadFunc number -> Thread)
@ -2086,6 +2080,8 @@ namespace OpenSim.Framework
} }
} }
public static long TotalFireAndForgetCallsMade { get { return numTotalThreadFuncsCalled; } }
public static Dictionary<string, int> GetFireAndForgetCallsMade() public static Dictionary<string, int> GetFireAndForgetCallsMade()
{ {
return new Dictionary<string, int>(m_fireAndForgetCallsMade); return new Dictionary<string, int>(m_fireAndForgetCallsMade);
@ -2093,6 +2089,11 @@ namespace OpenSim.Framework
private static Dictionary<string, int> m_fireAndForgetCallsMade = new Dictionary<string, int>(); private static Dictionary<string, int> m_fireAndForgetCallsMade = new Dictionary<string, int>();
public static void FireAndForget(System.Threading.WaitCallback callback)
{
FireAndForget(callback, null, null);
}
public static void FireAndForget(System.Threading.WaitCallback callback, object obj) public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
{ {
FireAndForget(callback, obj, null); FireAndForget(callback, obj, null);
@ -2100,6 +2101,8 @@ namespace OpenSim.Framework
public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context) public static void FireAndForget(System.Threading.WaitCallback callback, object obj, string context)
{ {
Interlocked.Increment(ref numTotalThreadFuncsCalled);
if (context != null) if (context != null)
{ {
if (!m_fireAndForgetCallsMade.ContainsKey(context)) if (!m_fireAndForgetCallsMade.ContainsKey(context))

View File

@ -1161,7 +1161,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="map">heightmap</param> /// <param name="map">heightmap</param>
public virtual void SendLayerData(float[] map) public virtual void SendLayerData(float[] map)
{ {
Util.FireAndForget(DoSendLayerData, m_scene.Heightmap.GetTerrainData()); Util.FireAndForget(DoSendLayerData, m_scene.Heightmap.GetTerrainData(), "LLClientView.DoSendLayerData");
} }
/// <summary> /// <summary>
@ -1373,7 +1373,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="windSpeeds">16x16 array of wind speeds</param> /// <param name="windSpeeds">16x16 array of wind speeds</param>
public virtual void SendWindData(Vector2[] windSpeeds) public virtual void SendWindData(Vector2[] windSpeeds)
{ {
Util.FireAndForget(DoSendWindData, windSpeeds); Util.FireAndForget(DoSendWindData, windSpeeds, "LLClientView.SendWindData");
} }
/// <summary> /// <summary>
@ -1382,7 +1382,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="windSpeeds">16x16 array of cloud densities</param> /// <param name="windSpeeds">16x16 array of cloud densities</param>
public virtual void SendCloudData(float[] cloudDensity) public virtual void SendCloudData(float[] cloudDensity)
{ {
Util.FireAndForget(DoSendCloudData, cloudDensity); Util.FireAndForget(DoSendCloudData, cloudDensity, "LLClientView.SendCloudData");
} }
/// <summary> /// <summary>
@ -8093,7 +8093,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
// This requests the asset if needed // This requests the asset if needed
HandleSimInventoryTransferRequestWithPermsCheck(sender, transfer); HandleSimInventoryTransferRequestWithPermsCheck(sender, transfer);
}); }, null, "LLClientView.HandleTransferRequest");
return true; return true;
} }
} }

View File

@ -732,7 +732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (!m_udpServer.OqrEngine.IsRunning) if (!m_udpServer.OqrEngine.IsRunning)
{ {
// Asynchronously run the callback // Asynchronously run the callback
Util.FireAndForget(FireQueueEmpty, categories); Util.FireAndForget(FireQueueEmpty, categories, "LLUDPClient.BeginFireQueueEmpty");
} }
else else
{ {

View File

@ -991,7 +991,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Fire this out on a different thread so that we don't hold up outgoing packet processing for // Fire this out on a different thread so that we don't hold up outgoing packet processing for
// everybody else if this is being called due to an ack timeout. // everybody else if this is being called due to an ack timeout.
// This is the same as processing as the async process of a logout request. // This is the same as processing as the async process of a logout request.
Util.FireAndForget(o => DeactivateClientDueToTimeout(client, timeoutTicks)); Util.FireAndForget(
o => DeactivateClientDueToTimeout(client, timeoutTicks), null, "LLUDPServer.DeactivateClientDueToTimeout");
return; return;
} }
@ -1225,7 +1226,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// buffer. // buffer.
object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet };
Util.FireAndForget(HandleUseCircuitCode, array); Util.FireAndForget(HandleUseCircuitCode, array, "LLUDPServer.HandleUseCircuitCode");
return; return;
} }
@ -1238,7 +1239,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// buffer. // buffer.
object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet };
Util.FireAndForget(HandleCompleteMovementIntoRegion, array); Util.FireAndForget(
HandleCompleteMovementIntoRegion, array, "LLUDPServer.HandleCompleteMovementIntoRegion");
return; return;
} }

View File

@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
// Do Decode! // Do Decode!
if (decode) if (decode)
Util.FireAndForget(delegate { Decode(assetID, j2kData); }); Util.FireAndForget(delegate { Decode(assetID, j2kData); }, null, "J2KDecoderModule.BeginDecode");
} }
} }

View File

@ -302,7 +302,7 @@ namespace OpenSim.Region.CoreModules.Asset
} }
Util.FireAndForget( Util.FireAndForget(
delegate { WriteFileCache(filename, asset); }); delegate { WriteFileCache(filename, asset); }, null, "FlotsamAssetCache.UpdateFileCache");
} }
} }
catch (Exception e) catch (Exception e)

View File

@ -593,7 +593,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
if (sendTime < now) if (sendTime < now)
{ {
Util.FireAndForget(o => SendAppearance(avatarID)); Util.FireAndForget(o => SendAppearance(avatarID), null, "AvatarFactoryModule.SendAppearance");
m_sendqueue.Remove(avatarID); m_sendqueue.Remove(avatarID);
} }
} }
@ -611,7 +611,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
if (sendTime < now) if (sendTime < now)
{ {
Util.FireAndForget(o => SaveAppearance(avatarID)); Util.FireAndForget(o => SaveAppearance(avatarID), null, "AvatarFactoryModule.SaveAppearance");
m_savequeue.Remove(avatarID); m_savequeue.Remove(avatarID);
} }
} }
@ -1038,7 +1038,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++); client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++);
else else
m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId); m_log.WarnFormat("[AVFACTORY]: Client_OnRequestWearables unable to find presence for {0}", client.AgentId);
}); }, null, "AvatarFactoryModule.OnClientRequestWearables");
} }
/// <summary> /// <summary>

View File

@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures
{ {
rc.Request(reqStream, m_Auth); rc.Request(reqStream, m_Auth);
m_log.DebugFormat("[XBakes]: stored {0} textures for user {1}", data.Length, agentId); m_log.DebugFormat("[XBakes]: stored {0} textures for user {1}", data.Length, agentId);
} }, null, "XBakesModule.Store"
); );
} }
} }

View File

@ -511,7 +511,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
// Notify about this user status // Notify about this user status
StatusNotify(friendList, agentID, online); StatusNotify(friendList, agentID, online);
} }, null, "FriendsModule.StatusChange"
); );
} }
} }

View File

@ -660,7 +660,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
FriendsService.Delete(friendUUI, agentID.ToString()); FriendsService.Delete(friendUUI, agentID.ToString());
// notify the exfriend's service // notify the exfriend's service
Util.FireAndForget(delegate { Delete(exfriendID, agentID, friendUUI); }); Util.FireAndForget(
delegate { Delete(exfriendID, agentID, friendUUI); }, null, "HGFriendsModule.DeleteFriendshipForeignFriend");
m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentID, friendUUI); m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentID, friendUUI);
return true; return true;
@ -678,7 +679,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
FriendsService.Delete(agentUUI, exfriendID.ToString()); FriendsService.Delete(agentUUI, exfriendID.ToString());
// notify the agent's service? // notify the agent's service?
Util.FireAndForget(delegate { Delete(agentID, exfriendID, agentUUI); }); Util.FireAndForget(
delegate { Delete(agentID, exfriendID, agentUUI); }, null, "HGFriendsModule.DeleteFriendshipLocalFriend");
m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentUUI, exfriendID); m_log.DebugFormat("[HGFRIENDS MODULE]: {0} terminated {1}", agentUUI, exfriendID);
return true; return true;

View File

@ -213,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
HandleUndeliverableMessage(im, result); HandleUndeliverableMessage(im, result);
else else
result(success); result(success);
}); }, null, "HGMessageTransferModule.SendInstantMessage");
return; return;
} }

View File

@ -194,7 +194,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
Util.FireAndForget(delegate Util.FireAndForget(delegate
{ {
GetImageAssets(((IScenePresence)obj).UUID); GetImageAssets(((IScenePresence)obj).UUID);
}); }, null, "UserProfileModule.GetImageAssets");
} }
/// <summary> /// <summary>

View File

@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar); AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar);
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0) if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
{ {
if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServRezerURI"))
{ {
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString(); string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url);

View File

@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (asset != null) if (asset != null)
{ {
Util.FireAndForget(delegate { handler(id, sender, asset); }); Util.FireAndForget(delegate { handler(id, sender, asset); }, null, "HGAssetBroker.GotFromCache");
return true; return true;
} }

View File

@ -236,7 +236,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
if (asset != null) if (asset != null)
{ {
Util.FireAndForget(delegate { handler(id, sender, asset); }); Util.FireAndForget(
o => handler(id, sender, asset), null, "LocalAssetServiceConnector.GotFromCacheCallback");
return true; return true;
} }
} }
@ -249,7 +250,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
// if (null == a) // if (null == a)
// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id); // m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id);
Util.FireAndForget(delegate { handler(assetID, s, a); }); Util.FireAndForget(
o => handler(assetID, s, a), null, "LocalAssetServiceConnector.GotFromServiceCallback");
}); });
} }

View File

@ -226,7 +226,10 @@ namespace OpenSim.Region.Framework.Scenes
// We must take a copy here since handle is acts like a reference when used in an iterator. // We must take a copy here since handle is acts like a reference when used in an iterator.
// This leads to race conditions if directly passed to SendCloseChildAgent with more than one neighbour region. // This leads to race conditions if directly passed to SendCloseChildAgent with more than one neighbour region.
ulong handleCopy = handle; ulong handleCopy = handle;
Util.FireAndForget((o) => { SendCloseChildAgent(agentID, handleCopy, auth_code); }); Util.FireAndForget(
o => SendCloseChildAgent(agentID, handleCopy, auth_code),
null,
"SceneCommunicationService.SendCloseChildAgentConnections");
} }
} }

View File

@ -1235,7 +1235,8 @@ namespace OpenSim.Region.Framework.Scenes
string.Format("Rez attachments for {0} in {1}", Name, Scene.Name), string.Format("Rez attachments for {0} in {1}", Name, Scene.Name),
null); null);
else else
Util.FireAndForget(o => Scene.AttachmentsModule.RezAttachments(this)); Util.FireAndForget(
o => Scene.AttachmentsModule.RezAttachments(this), null, "ScenePresence.RezAttachmentsOnLogin");
} }
} }
else else
@ -1338,7 +1339,7 @@ namespace OpenSim.Region.Framework.Scenes
UseFakeGroupTitle = false; UseFakeGroupTitle = false;
SendAvatarDataToAllClients(false); SendAvatarDataToAllClients(false);
}); }, null, "Scenepresence.ForceViewersUpdateName");
} }
public int GetStateSource() public int GetStateSource()
@ -3645,7 +3646,8 @@ namespace OpenSim.Region.Framework.Scenes
agentpos.CopyFrom(cadu, ControllingClient.SessionId); agentpos.CopyFrom(cadu, ControllingClient.SessionId);
// Let's get this out of the update loop // Let's get this out of the update loop
Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); Util.FireAndForget(
o => m_scene.SendOutChildAgentUpdates(agentpos, this), null, "ScenePresence.SendOutChildAgentUpdates");
} }
} }
@ -4515,7 +4517,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
}); }, null, "ScenePresence.SendScriptEventToAttachments");
} }
/// <summary> /// <summary>

View File

@ -323,7 +323,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonRezAtRoot(UUID hostID, UUID scriptID, string item, Vector3 pos, Vector3 vel, Quaternion rot, string param) public UUID JsonRezAtRoot(UUID hostID, UUID scriptID, string item, Vector3 pos, Vector3 vel, Quaternion rot, string param)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(o => DoJsonRezObject(hostID, scriptID, reqID, item, pos, vel, rot, param)); Util.FireAndForget(
o => DoJsonRezObject(hostID, scriptID, reqID, item, pos, vel, rot, param), null, "JsonStoreScriptModule.DoJsonRezObject");
return reqID; return reqID;
} }
@ -336,7 +337,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonReadNotecard(UUID hostID, UUID scriptID, UUID storeID, string path, string notecardIdentifier) public UUID JsonReadNotecard(UUID hostID, UUID scriptID, UUID storeID, string path, string notecardIdentifier)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier)); Util.FireAndForget(
o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier), null, "JsonStoreScriptModule.JsonReadNotecard");
return reqID; return reqID;
} }
@ -349,7 +351,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonWriteNotecard(UUID hostID, UUID scriptID, UUID storeID, string path, string name) public UUID JsonWriteNotecard(UUID hostID, UUID scriptID, UUID storeID, string path, string name)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(delegate(object o) { DoJsonWriteNotecard(reqID,hostID,scriptID,storeID,path,name); }); Util.FireAndForget(
o => DoJsonWriteNotecard(reqID,hostID,scriptID,storeID,path,name), null, "JsonStoreScriptModule.DoJsonWriteNotecard");
return reqID; return reqID;
} }
@ -464,7 +467,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonTakeValue(UUID hostID, UUID scriptID, UUID storeID, string path) public UUID JsonTakeValue(UUID hostID, UUID scriptID, UUID storeID, string path)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(delegate(object o) { DoJsonTakeValue(scriptID,reqID,storeID,path,false); }); Util.FireAndForget(
o => DoJsonTakeValue(scriptID,reqID,storeID,path,false), null, "JsonStoreScriptModule.DoJsonTakeValue");
return reqID; return reqID;
} }
@ -472,7 +476,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonTakeValueJson(UUID hostID, UUID scriptID, UUID storeID, string path) public UUID JsonTakeValueJson(UUID hostID, UUID scriptID, UUID storeID, string path)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(delegate(object o) { DoJsonTakeValue(scriptID,reqID,storeID,path,true); }); Util.FireAndForget(
o => DoJsonTakeValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonTakeValueJson");
return reqID; return reqID;
} }
@ -485,7 +490,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonReadValue(UUID hostID, UUID scriptID, UUID storeID, string path) public UUID JsonReadValue(UUID hostID, UUID scriptID, UUID storeID, string path)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(delegate(object o) { DoJsonReadValue(scriptID,reqID,storeID,path,false); }); Util.FireAndForget(
o => DoJsonReadValue(scriptID,reqID,storeID,path,false), null, "JsonStoreScriptModule.DoJsonReadValue");
return reqID; return reqID;
} }
@ -493,7 +499,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
public UUID JsonReadValueJson(UUID hostID, UUID scriptID, UUID storeID, string path) public UUID JsonReadValueJson(UUID hostID, UUID scriptID, UUID storeID, string path)
{ {
UUID reqID = UUID.Random(); UUID reqID = UUID.Random();
Util.FireAndForget(delegate(object o) { DoJsonReadValue(scriptID,reqID,storeID,path,true); }); Util.FireAndForget(
o => DoJsonReadValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonReadValueJson");
return reqID; return reqID;
} }

View File

@ -294,7 +294,8 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
for (int i = 0 ; i < selection.Count ; i++) for (int i = 0 ; i < selection.Count ; i++)
sel.Add(selection[i].AsUInteger()); sel.Add(selection[i].AsUInteger());
Util.FireAndForget(x => { m_module.HandleMenuSelection(action, m_agentID, sel); }); Util.FireAndForget(
x => { m_module.HandleMenuSelection(action, m_agentID, sel); }, null, "DynamicMenuModule.HandleMenuSelection");
Encoding encoding = Encoding.UTF8; Encoding encoding = Encoding.UTF8;
return encoding.GetBytes(OSDParser.SerializeLLSDXmlString(new OSD())); return encoding.GetBytes(OSDParser.SerializeLLSDXmlString(new OSD()));

View File

@ -3343,7 +3343,7 @@ Console.WriteLine(" JointCreateFixed");
RequestAssetDelegate assetProvider = _parent_scene.RequestAssetMethod; RequestAssetDelegate assetProvider = _parent_scene.RequestAssetMethod;
if (assetProvider != null) if (assetProvider != null)
assetProvider(_pbs.SculptTexture, MeshAssetReceived); assetProvider(_pbs.SculptTexture, MeshAssetReceived);
}); }, null, "ODEPrim.CheckMeshAsset");
} }
} }

View File

@ -2979,7 +2979,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
money.ObjectGiveMoney( money.ObjectGiveMoney(
m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount); m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount);
}); }, null, "LSL_Api.llGiveMoney");
} }
public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
@ -3075,7 +3075,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
// Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
} }
}); }, null, "LSL_Api.llRezAtRoot");
//ScriptSleep((int)((groupmass * velmag) / 10)); //ScriptSleep((int)((groupmass * velmag) / 10));
ScriptSleep(100); ScriptSleep(100);
@ -3270,7 +3270,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
/// </remarks> /// </remarks>
public void DetachFromAvatar() public void DetachFromAvatar()
{ {
Util.FireAndForget(DetachWrapper, m_host); Util.FireAndForget(DetachWrapper, m_host, "LSL_Api.DetachFromAvatar");
} }
private void DetachWrapper(object o) private void DetachWrapper(object o)
@ -12421,7 +12421,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
new LSL_String(replydata) }, new LSL_String(replydata) },
new DetectParams[0])); new DetectParams[0]));
} }
}); }, null, "LSL_Api.llTransferLindenDollars");
return txn.ToString(); return txn.ToString();
} }

View File

@ -790,9 +790,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// We will launch the teleport on a new thread so that when the script threads are terminated // We will launch the teleport on a new thread so that when the script threads are terminated
// before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
Util.FireAndForget(o => World.RequestTeleportLocation( Util.FireAndForget(
o => World.RequestTeleportLocation(
presence.ControllingClient, regionName, position, presence.ControllingClient, regionName, position,
lookat, (uint)TPFlags.ViaLocation)); lookat, (uint)TPFlags.ViaLocation),
null, "OSSL_Api.TeleportAgentByRegionCoords");
ScriptSleep(5000); ScriptSleep(5000);
@ -836,9 +838,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// We will launch the teleport on a new thread so that when the script threads are terminated // We will launch the teleport on a new thread so that when the script threads are terminated
// before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting.
Util.FireAndForget(o => World.RequestTeleportLocation( Util.FireAndForget(
o => World.RequestTeleportLocation(
presence.ControllingClient, regionHandle, presence.ControllingClient, regionHandle,
position, lookat, (uint)TPFlags.ViaLocation)); position, lookat, (uint)TPFlags.ViaLocation),
null, "OSSL_Api.TeleportAgentByRegionName");
ScriptSleep(5000); ScriptSleep(5000);

View File

@ -182,7 +182,8 @@ namespace OpenSim.Server.Handlers.Simulation
if (action.Equals("release")) if (action.Equals("release"))
ReleaseAgent(regionID, id); ReleaseAgent(regionID, id);
else else
Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id, auth_token); }); Util.FireAndForget(
o => m_SimulationService.CloseAgent(destination, id, auth_token), null, "AgentHandler.DoAgentDelete");
responsedata["int_response_code"] = HttpStatusCode.OK; responsedata["int_response_code"] = HttpStatusCode.OK;
responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); responsedata["str_response_string"] = "OpenSim agent " + id.ToString();

View File

@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
Util.FireAndForget(delegate(object o) Util.FireAndForget(delegate(object o)
{ {
m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
}); }, null, "SimianActivityDetector.SetLastPositionOnMakeRootAgent");
} }
public void OnNewClient(IClientAPI client) public void OnNewClient(IClientAPI client)
@ -94,7 +94,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
Util.FireAndForget(delegate(object o) Util.FireAndForget(delegate(object o)
{ {
m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
}); }, null, "SimianActivityDetector.SetLastPositionOnEnteringNewParcel");
} }
} }
} }

View File

@ -225,7 +225,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
{ {
AssetBase asset = SimianGetOperation(id); AssetBase asset = SimianGetOperation(id);
handler(id, sender, asset); handler(id, sender, asset);
} }, null, "SimianAssetServiceConnector.GetFromService"
); );
return true; return true;

View File

@ -198,7 +198,8 @@ namespace OpenSim.Services.HypergridService
// So let's send back the call, but start a thread to continue // So let's send back the call, but start a thread to continue
// with the verification and the actual action. // with the verification and the actual action.
Util.FireAndForget(delegate { ProcessFriendshipOffered(fromID, fromName, toID, message); }); Util.FireAndForget(
o => ProcessFriendshipOffered(fromID, fromName, toID, message), null, "HGFriendsService.ProcessFriendshipOffered");
return true; return true;
} }

View File

@ -166,7 +166,8 @@ namespace OpenSim.Services.MapImageService
// m_log.DebugFormat("{0} UpdateMultiResolutionFilesAsync: scheduling update for <{1},{2}>", LogHeader, x, y); // m_log.DebugFormat("{0} UpdateMultiResolutionFilesAsync: scheduling update for <{1},{2}>", LogHeader, x, y);
multiRezToBuild.Enqueue(new mapToMultiRez(x, y)); multiRezToBuild.Enqueue(new mapToMultiRez(x, y));
if (multiRezToBuild.Count == 1) if (multiRezToBuild.Count == 1)
Util.FireAndForget(DoUpdateMultiResolutionFilesAsync); Util.FireAndForget(
DoUpdateMultiResolutionFilesAsync, null, "MapImageService.DoUpdateMultiResolutionFilesAsync");
} }
return true; return true;

View File

@ -78,7 +78,7 @@ namespace OpenSim.Tests.Stress
Drawer d = new Drawer(this, i); Drawer d = new Drawer(this, i);
drawers.Add(d); drawers.Add(d);
Console.WriteLine("Starting drawer {0}", i); Console.WriteLine("Starting drawer {0}", i);
Util.FireAndForget(o => d.Draw()); Util.FireAndForget(o => d.Draw(), null, "VectorRenderModuleStressTests.TestConcurrentRepeatedDraw");
} }
Thread.Sleep(10 * 60 * 1000); Thread.Sleep(10 * 60 * 1000);