Commit Graph

34 Commits (df7468ffa27b46f074b0f9c6d6c7be4e09164c88)

Author SHA1 Message Date
UbitUmarov a11edceb00 seems to compile ( tests comented out) 2015-09-02 19:54:53 +01:00
UbitUmarov 371c9dd2af bad merge? 2015-09-01 14:54:35 +01:00
Justin Clark-Casey (justincc) 86367d7219 refactor: Move methods to start a monitored thread, start work in its own thread and run work in the jobengine from Watchdog to a WorkManager class.
This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management.
Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget.
Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere
2014-11-25 23:56:32 +00:00
Melanie f0eeb47262 Add the "StateChange" function to the async comand manager to differentiate
between state changes and script exit/reset.
2014-04-30 20:54:34 +01:00
Melanie 648e258b8e Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
2013-06-04 21:09:25 +01:00
Justin Clark-Casey (justincc) 217c7d1140 Remove unnecessary m_scenes and m_scene from AsyncCommandManager.
These were private and the sole point of use (to know when to load config for the first time) can be done by looking at script engines instead.
2013-05-31 23:00:10 +01:00
Justin Clark-Casey (justincc) 921ad8704e Lock areas of AsyncCommandManager where multiple threads could try to access/update the same static structures simultaneously.
This is possible where there is more than one scene (multiple copies of the same script engine) and/or more than one script engine being used.
These operations are not thread safe and could be leading to the exceptions/problems seen in http://opensimulator.org/mantis/view.php?id=6651
This also prevents a small race condition where more than one AsyncLSLCmdHandlerThread could be started.
2013-05-31 22:50:15 +01:00
Justin Clark-Casey (justincc) 00c1586ff8 refactor: Remove unused AsyncCommandManager.PleaseShutdown 2013-05-31 18:12:36 +01:00
Justin Clark-Casey (justincc) 46335b103e If an exception occurs in the AsyncCommandManager loop, spit it out to log rather than silently swallowing it.
This might help diagnose the cause of http://opensimulator.org/mantis/view.php?id=6651 where sometimes scripts fail to start on region start.
2013-05-30 23:51:35 +01:00
Justin Clark-Casey (justincc) 831e4c3850 Fix bug where outstanding llHTTPRequests for scripts were not being aborted when they were deleted.
This was because AsyncCommandManager was handing an item ID to IHttpRequestModule.StopHttpRequest() rather than the expected request ID.
This commit also makes the http request asynchronous using BeginGetResponse() rather than doing this by launching a new thread
so that we can more safely abort it via HttpWebRequest.Abort() rather than aborting the thread itself.
This also renames StopHttpRequest() to StopHttpRequestsForScript() since any outstanding requests are now aborted and/or removed.
2013-04-04 00:36:15 +01:00
UbitUmarov f254af29ac avoid potencial NullReferenceException 2012-11-24 03:39:37 +00:00
Melanie 771d79e83e Merge branch 'master' into careminster
Conflicts:
	OpenSim/Framework/Monitoring/BaseStatsCollector.cs
	OpenSim/Region/Application/OpenSim.cs
	OpenSim/Region/Application/OpenSimBase.cs
	OpenSim/Region/Framework/Scenes/SceneManager.cs
	bin/OpenMetaverse.Rendering.Meshmerizer.dll
	bin/OpenMetaverse.StructuredData.dll
	bin/OpenMetaverse.dll
	bin/OpenMetaverseTypes.dll
	prebuild.xml
2012-07-28 00:39:36 +01:00
Justin Clark-Casey (justincc) 5aec0ff207 Move Watchdog and MemoryWatchdog classes into OpenSim.Framework.Monitoring with other monitoring code from OpenSim.Framework 2012-07-25 23:27:00 +01:00
Melanie d632fd7124 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
	OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
2012-07-12 08:55:16 +01:00
Justin Clark-Casey (justincc) fc24563206 Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
2012-07-11 21:43:35 +01:00
Melanie caa19862fa Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2012-03-07 00:51:59 +00:00
Justin Clark-Casey (justincc) 98251cdab3 Add sensor, dataserver requests, timer and listener counts to "xengine status" command.
This is for diagnostic purposes.
2012-03-06 23:21:17 +00:00
Melanie 37068d17c5 Merge branch 'master' into careminster 2012-02-24 09:56:06 +00:00
Justin Clark-Casey (justincc) f67f37074f Stop spurious scene loop startup timeout alarms for scenes with many prims.
On the first frame, all startup scene objects are added to the physics scene.
This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame.
This commit also slightly changes the behaviour of timeout reporting.
Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check.
Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-24 05:02:33 +00:00
Melanie Thielker c263fc54ac Add a state change method to the Async commands handler to allow timers
and http requests to survive state changes
2010-07-18 21:05:50 +02:00
Melanie 9fd9211a38 Add some conditionals to references to the WorldComm module, so that the
module can be disabled without crashing the sim
2009-11-28 09:23:26 +00:00
John Hurliman b2ed348aa2 Implemented a Watchdog class. Do not manually create Thread objects anymore, use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated 2009-10-22 12:33:23 -07:00
John Hurliman 2519f071f2 Fixing a few compile errors in the previous commit 2009-10-06 02:50:59 -07:00
Jeff Ames 840de6c036 Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. 2009-06-01 06:37:14 +00:00
Dr Scofield 9b66108081 This changeset is the step 1 of 2 in refactoring
OpenSim.Region.Environment into a "framework" part and a modules only
part. This first changeset refactors OpenSim.Region.Environment.Scenes,
OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces
into OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region
modules in OpenSim.Region.Environment.

The next step will be to move region modules up from
OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and
then sort out which modules are really core modules and which should
move out to forge.

I've been very careful to NOT BREAK anything. i hope i've
succeeded. as this is the work of a whole week i hope i managed to
keep track with the applied patches of the last week --- could any of
you that did check in stuff have a look at whether it survived? thx!
2009-02-06 16:55:34 +00:00
Melanie Thielker 833f5e8bed Refactor IEventReceiver back into IScriptEngine 2008-11-08 02:24:34 +00:00
Melanie Thielker 415520cea6 Fix listeners in multi-region instances 2008-09-26 20:12:11 +00:00
Melanie Thielker f3c8963c86 Convergence is almost complete. This brings the diff between the API to < 10k
and makes it use a common set of types in both engine. Fixes the issues with
running both engines and HTTP requests / listens / timers etc..
Also fixes a couple of minor Scene issues and a CTB by nullref.
2008-09-25 05:13:44 +00:00
Melanie Thielker fb7a29a5ef Rename lots of stuff in DNE to reduce source code differences in the
LSL implementation files. Rename lots of stuff in XEngine for the same
reason. Move methods between interfaces. Just refactor stuff.
2008-09-24 13:18:06 +00:00
Melanie Thielker 218902bedc Decouple AsyncCommands from XEngine and the script instance. Make
all methods needed outside the API ststic. Async command processing
is now wholly internal to the API. This sets the stage for the next
convergence step.
2008-09-24 02:58:05 +00:00
Justin Clarke Casey 7f3bfa277b * minor: method documentation 2008-09-16 16:37:16 +00:00
Teravus Ovares 7d89e12293 * This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point.  Regular people should let the dust settle.
* This has been tested to work with most basic functions. However..   make sure you back up 'everything' before using this.  It's that big!  
* Essentially we're back at square 1 in the testing phase..  so lets identify things that broke.
2008-09-06 07:52:41 +00:00
Jeff Ames a2b1a1787d Minor formatting cleanup. 2008-06-25 14:30:28 +00:00
lbsa71 6b7930104b * Applied patch from Melanie, mantis issue #1581 - "Refactor LSL language, api and compiler out of XEngine"
"First stage in a major Script Engine refactor, that will result in the LSL implementaions ebing reconverged. Not there yet, but one major part is done."
Thank you, Melanie!
2008-06-24 21:09:49 +00:00