summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/AsyncIOThread.cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-12-29 21:01:16 +0100
committerJose <jose@zeroc.com>2016-12-29 21:01:16 +0100
commit54941beff80f3ebab2b15af4609c7ec8bc0d941e (patch)
treebdd4eb6573f5c4673c2129cc2eb616b1188fc543 /csharp/src/Ice/AsyncIOThread.cs
parentJavaScript Ice.Long fixes and improvements (diff)
downloadice-54941beff80f3ebab2b15af4609c7ec8bc0d941e.tar.bz2
ice-54941beff80f3ebab2b15af4609c7ec8bc0d941e.tar.xz
ice-54941beff80f3ebab2b15af4609c7ec8bc0d941e.zip
CSharp cleanup and fixes:
- Add EditorBrowsable(EditorBrowsableState.Never) to hidde internal public methods from Intellisense, see ICE-7448. - Remove Base64 and replace it with .NET System.Convert see ICE-7477 - Remove SysLogger as that was only used by Mono - Simplify ThreadPriority setting - Remove using statements that are not required - Normalize string, char, object spell, preferred over String, Char, Object - Shorthen qualifier names avoiding redundant scopes.
Diffstat (limited to 'csharp/src/Ice/AsyncIOThread.cs')
-rw-r--r--csharp/src/Ice/AsyncIOThread.cs20
1 files changed, 6 insertions, 14 deletions
diff --git a/csharp/src/Ice/AsyncIOThread.cs b/csharp/src/Ice/AsyncIOThread.cs
index 0d9db92604f..b93e1548a94 100644
--- a/csharp/src/Ice/AsyncIOThread.cs
+++ b/csharp/src/Ice/AsyncIOThread.cs
@@ -21,16 +21,8 @@ namespace IceInternal
_thread = new HelperThread(this);
updateObserver();
- if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
- {
- ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
- instance.initializationData().properties.getProperty("Ice.ThreadPriority"));
- _thread.Start(priority);
- }
- else
- {
- _thread.Start(ThreadPriority.Normal);
- }
+ _thread.Start(Util.stringToThreadPriority(
+ instance.initializationData().properties.getProperty("Ice.ThreadPriority")));
}
public void
@@ -59,7 +51,7 @@ namespace IceInternal
{
Debug.Assert(!_destroyed);
_queue.AddLast(callback);
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -69,7 +61,7 @@ namespace IceInternal
{
Debug.Assert(!_destroyed);
_destroyed = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -103,7 +95,7 @@ namespace IceInternal
while(!_destroyed && _queue.Count == 0)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
LinkedList<ThreadPoolWorkItem> tmp = queue;
@@ -140,7 +132,7 @@ namespace IceInternal
if(_observer != null)
{
- _observer.detach();
+ _observer.detach();
}
}