diff options
author | Teravus Ovares | 2008-05-30 12:27:06 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-30 12:27:06 +0000 |
commit | 1a47ff8094ee414a47aebd310826906d89428a09 (patch) | |
tree | 0e90b3a33f43ff8617a077bb57b86d6b28e63e71 /ThirdParty/SmartThreadPool/WorkItemInfo.cs | |
parent | * Fixed a dangling event hook that I added. (diff) | |
download | opensim-SC_OLD-1a47ff8094ee414a47aebd310826906d89428a09.zip opensim-SC_OLD-1a47ff8094ee414a47aebd310826906d89428a09.tar.gz opensim-SC_OLD-1a47ff8094ee414a47aebd310826906d89428a09.tar.bz2 opensim-SC_OLD-1a47ff8094ee414a47aebd310826906d89428a09.tar.xz |
* 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.
Diffstat (limited to 'ThirdParty/SmartThreadPool/WorkItemInfo.cs')
-rw-r--r-- | ThirdParty/SmartThreadPool/WorkItemInfo.cs | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/ThirdParty/SmartThreadPool/WorkItemInfo.cs b/ThirdParty/SmartThreadPool/WorkItemInfo.cs new file mode 100644 index 0000000..c259339 --- /dev/null +++ b/ThirdParty/SmartThreadPool/WorkItemInfo.cs | |||
@@ -0,0 +1,102 @@ | |||
1 | // Ami Bar | ||
2 | // amibar@gmail.com | ||
3 | |||
4 | namespace Amib.Threading | ||
5 | { | ||
6 | #region WorkItemInfo class | ||
7 | |||
8 | /// <summary> | ||
9 | /// Summary description for WorkItemInfo. | ||
10 | /// </summary> | ||
11 | public class WorkItemInfo | ||
12 | { | ||
13 | /// <summary> | ||
14 | /// Use the caller's security context | ||
15 | /// </summary> | ||
16 | private bool _useCallerCallContext; | ||
17 | |||
18 | /// <summary> | ||
19 | /// Use the caller's security context | ||
20 | /// </summary> | ||
21 | private bool _useCallerHttpContext; | ||
22 | |||
23 | /// <summary> | ||
24 | /// Dispose of the state object of a work item | ||
25 | /// </summary> | ||
26 | private bool _disposeOfStateObjects; | ||
27 | |||
28 | /// <summary> | ||
29 | /// The option to run the post execute | ||
30 | /// </summary> | ||
31 | private CallToPostExecute _callToPostExecute; | ||
32 | |||
33 | /// <summary> | ||
34 | /// A post execute callback to call when none is provided in | ||
35 | /// the QueueWorkItem method. | ||
36 | /// </summary> | ||
37 | private PostExecuteWorkItemCallback _postExecuteWorkItemCallback; | ||
38 | |||
39 | /// <summary> | ||
40 | /// The priority of the work item | ||
41 | /// </summary> | ||
42 | private WorkItemPriority _workItemPriority; | ||
43 | |||
44 | public WorkItemInfo() | ||
45 | { | ||
46 | _useCallerCallContext = SmartThreadPool.DefaultUseCallerCallContext; | ||
47 | _useCallerHttpContext = SmartThreadPool.DefaultUseCallerHttpContext; | ||
48 | _disposeOfStateObjects = SmartThreadPool.DefaultDisposeOfStateObjects; | ||
49 | _callToPostExecute = SmartThreadPool.DefaultCallToPostExecute; | ||
50 | _postExecuteWorkItemCallback = SmartThreadPool.DefaultPostExecuteWorkItemCallback; | ||
51 | _workItemPriority = SmartThreadPool.DefaultWorkItemPriority; | ||
52 | } | ||
53 | |||
54 | public WorkItemInfo(WorkItemInfo workItemInfo) | ||
55 | { | ||
56 | _useCallerCallContext = workItemInfo._useCallerCallContext; | ||
57 | _useCallerHttpContext = workItemInfo._useCallerHttpContext; | ||
58 | _disposeOfStateObjects = workItemInfo._disposeOfStateObjects; | ||
59 | _callToPostExecute = workItemInfo._callToPostExecute; | ||
60 | _postExecuteWorkItemCallback = workItemInfo._postExecuteWorkItemCallback; | ||
61 | _workItemPriority = workItemInfo._workItemPriority; | ||
62 | } | ||
63 | |||
64 | public bool UseCallerCallContext | ||
65 | { | ||
66 | get { return _useCallerCallContext; } | ||
67 | set { _useCallerCallContext = value; } | ||
68 | } | ||
69 | |||
70 | public bool UseCallerHttpContext | ||
71 | { | ||
72 | get { return _useCallerHttpContext; } | ||
73 | set { _useCallerHttpContext = value; } | ||
74 | } | ||
75 | |||
76 | public bool DisposeOfStateObjects | ||
77 | { | ||
78 | get { return _disposeOfStateObjects; } | ||
79 | set { _disposeOfStateObjects = value; } | ||
80 | } | ||
81 | |||
82 | public CallToPostExecute CallToPostExecute | ||
83 | { | ||
84 | get { return _callToPostExecute; } | ||
85 | set { _callToPostExecute = value; } | ||
86 | } | ||
87 | |||
88 | public PostExecuteWorkItemCallback PostExecuteWorkItemCallback | ||
89 | { | ||
90 | get { return _postExecuteWorkItemCallback; } | ||
91 | set { _postExecuteWorkItemCallback = value; } | ||
92 | } | ||
93 | |||
94 | public WorkItemPriority WorkItemPriority | ||
95 | { | ||
96 | get { return _workItemPriority; } | ||
97 | set { _workItemPriority = value; } | ||
98 | } | ||
99 | } | ||
100 | |||
101 | #endregion | ||
102 | } | ||