From 1a47ff8094ee414a47aebd310826906d89428a09 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 30 May 2008 12:27:06 +0000 Subject: * This is Melanie's XEngine script engine. I've not tested this real well, however, it's confirmed to compile and OpenSimulator to run successfully without this script engine active. --- ThirdParty/SmartThreadPool/WIGStartInfo.cs | 99 ++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 ThirdParty/SmartThreadPool/WIGStartInfo.cs (limited to 'ThirdParty/SmartThreadPool/WIGStartInfo.cs') diff --git a/ThirdParty/SmartThreadPool/WIGStartInfo.cs b/ThirdParty/SmartThreadPool/WIGStartInfo.cs new file mode 100644 index 0000000..150317f --- /dev/null +++ b/ThirdParty/SmartThreadPool/WIGStartInfo.cs @@ -0,0 +1,99 @@ +// Ami Bar +// amibar@gmail.com + +namespace Amib.Threading +{ + /// + /// Summary description for WIGStartInfo. + /// + public class WIGStartInfo + { + /// + /// Use the caller's security context + /// + private bool _useCallerCallContext; + + /// + /// Use the caller's HTTP context + /// + private bool _useCallerHttpContext; + + /// + /// Dispose of the state object of a work item + /// + private bool _disposeOfStateObjects; + + /// + /// The option to run the post execute + /// + private CallToPostExecute _callToPostExecute; + + /// + /// A post execute callback to call when none is provided in + /// the QueueWorkItem method. + /// + private PostExecuteWorkItemCallback _postExecuteWorkItemCallback; + + /// + /// Indicate the WorkItemsGroup to suspend the handling of the work items + /// until the Start() method is called. + /// + private bool _startSuspended; + + public WIGStartInfo() + { + _useCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; + _useCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext; + _disposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects; + _callToPostExecute = SmartThreadPool.DefaultCallToPostExecute; + _postExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; + _startSuspended = SmartThreadPool.DefaultStartSuspended; + } + + public WIGStartInfo(WIGStartInfo wigStartInfo) + { + _useCallerCallContext = wigStartInfo._useCallerCallContext; + _useCallerHttpContext = wigStartInfo._useCallerHttpContext; + _disposeOfStateObjects = wigStartInfo._disposeOfStateObjects; + _callToPostExecute = wigStartInfo._callToPostExecute; + _postExecuteWorkItemCallback = wigStartInfo._postExecuteWorkItemCallback; + _startSuspended = wigStartInfo._startSuspended; + } + + public bool UseCallerCallContext + { + get { return _useCallerCallContext; } + set { _useCallerCallContext = value; } + } + + public bool UseCallerHttpContext + { + get { return _useCallerHttpContext; } + set { _useCallerHttpContext = value; } + } + + public bool DisposeOfStateObjects + { + get { return _disposeOfStateObjects; } + set { _disposeOfStateObjects = value; } + } + + public CallToPostExecute CallToPostExecute + { + get { return _callToPostExecute; } + set { _callToPostExecute = value; } + } + + public PostExecuteWorkItemCallback PostExecuteWorkItemCallback + { + get { return _postExecuteWorkItemCallback; } + set { _postExecuteWorkItemCallback = value; } + } + + public bool StartSuspended + { + get { return _startSuspended; } + set { _startSuspended = value; } + } + } +} -- cgit v1.1