diff options
author | Robert Adams | 2013-05-02 07:02:28 -0700 |
---|---|---|
committer | Robert Adams | 2013-05-02 07:02:28 -0700 |
commit | a9480aed852ac6c9f5d7c35006dad77f86de8027 (patch) | |
tree | 9d1b85f51cbe8da87c2f455d776eeda0eafd00ff /ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs | |
parent | BulletSim: fix crash when mesh asset wasn't available when meshing (diff) | |
parent | Make default config directory "." (diff) | |
download | opensim-SC-a9480aed852ac6c9f5d7c35006dad77f86de8027.zip opensim-SC-a9480aed852ac6c9f5d7c35006dad77f86de8027.tar.gz opensim-SC-a9480aed852ac6c9f5d7c35006dad77f86de8027.tar.bz2 opensim-SC-a9480aed852ac6c9f5d7c35006dad77f86de8027.tar.xz |
Merge branch 'master' into bulletsim4
Diffstat (limited to 'ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs')
-rw-r--r-- | ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs b/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs index ba7d73f..d9502bb 100644 --- a/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs +++ b/ThirdParty/SmartThreadPool/SmartThreadPool.ThreadEntry.cs | |||
@@ -1,60 +1,60 @@ | |||
1 | | 1 | |
2 | using System; | 2 | using System; |
3 | using Amib.Threading.Internal; | 3 | using Amib.Threading.Internal; |
4 | 4 | ||
5 | namespace Amib.Threading | 5 | namespace Amib.Threading |
6 | { | 6 | { |
7 | public partial class SmartThreadPool | 7 | public partial class SmartThreadPool |
8 | { | 8 | { |
9 | #region ThreadEntry class | 9 | #region ThreadEntry class |
10 | 10 | ||
11 | internal class ThreadEntry | 11 | internal class ThreadEntry |
12 | { | 12 | { |
13 | /// <summary> | 13 | /// <summary> |
14 | /// The thread creation time | 14 | /// The thread creation time |
15 | /// The value is stored as UTC value. | 15 | /// The value is stored as UTC value. |
16 | /// </summary> | 16 | /// </summary> |
17 | private readonly DateTime _creationTime; | 17 | private readonly DateTime _creationTime; |
18 | 18 | ||
19 | /// <summary> | 19 | /// <summary> |
20 | /// The last time this thread has been running | 20 | /// The last time this thread has been running |
21 | /// It is updated by IAmAlive() method | 21 | /// It is updated by IAmAlive() method |
22 | /// The value is stored as UTC value. | 22 | /// The value is stored as UTC value. |
23 | /// </summary> | 23 | /// </summary> |
24 | private DateTime _lastAliveTime; | 24 | private DateTime _lastAliveTime; |
25 | 25 | ||
26 | /// <summary> | 26 | /// <summary> |
27 | /// A reference from each thread in the thread pool to its SmartThreadPool | 27 | /// A reference from each thread in the thread pool to its SmartThreadPool |
28 | /// object container. | 28 | /// object container. |
29 | /// With this variable a thread can know whatever it belongs to a | 29 | /// With this variable a thread can know whatever it belongs to a |
30 | /// SmartThreadPool. | 30 | /// SmartThreadPool. |
31 | /// </summary> | 31 | /// </summary> |
32 | private readonly SmartThreadPool _associatedSmartThreadPool; | 32 | private readonly SmartThreadPool _associatedSmartThreadPool; |
33 | 33 | ||
34 | /// <summary> | 34 | /// <summary> |
35 | /// A reference to the current work item a thread from the thread pool | 35 | /// A reference to the current work item a thread from the thread pool |
36 | /// is executing. | 36 | /// is executing. |
37 | /// </summary> | 37 | /// </summary> |
38 | public WorkItem CurrentWorkItem { get; set; } | 38 | public WorkItem CurrentWorkItem { get; set; } |
39 | 39 | ||
40 | public ThreadEntry(SmartThreadPool stp) | 40 | public ThreadEntry(SmartThreadPool stp) |
41 | { | 41 | { |
42 | _associatedSmartThreadPool = stp; | 42 | _associatedSmartThreadPool = stp; |
43 | _creationTime = DateTime.UtcNow; | 43 | _creationTime = DateTime.UtcNow; |
44 | _lastAliveTime = DateTime.MinValue; | 44 | _lastAliveTime = DateTime.MinValue; |
45 | } | 45 | } |
46 | 46 | ||
47 | public SmartThreadPool AssociatedSmartThreadPool | 47 | public SmartThreadPool AssociatedSmartThreadPool |
48 | { | 48 | { |
49 | get { return _associatedSmartThreadPool; } | 49 | get { return _associatedSmartThreadPool; } |
50 | } | 50 | } |
51 | 51 | ||
52 | public void IAmAlive() | 52 | public void IAmAlive() |
53 | { | 53 | { |
54 | _lastAliveTime = DateTime.UtcNow; | 54 | _lastAliveTime = DateTime.UtcNow; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
58 | #endregion | 58 | #endregion |
59 | } | 59 | } |
60 | } \ No newline at end of file | 60 | } \ No newline at end of file |