beagle r4418 - trunk/beagle/beagled
- From: joeshaw svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4418 - trunk/beagle/beagled
- Date: Sat, 26 Jan 2008 19:53:42 +0000 (GMT)
Author: joeshaw
Date: Sat Jan 26 19:53:42 2008
New Revision: 4418
URL: http://svn.gnome.org/viewvc/beagle?rev=4418&view=rev
Log:
Move code which handles ThreadAbortException into its own named method
from an anonymous method, so that you get meaningful names in the
logs if it needs to join that thread.
Modified:
trunk/beagle/beagled/Server.cs
Modified: trunk/beagle/beagled/Server.cs
==============================================================================
--- trunk/beagle/beagled/Server.cs (original)
+++ trunk/beagle/beagled/Server.cs Sat Jan 26 19:53:42 2008
@@ -897,6 +897,17 @@
http_listener = null;
}
+ private void RunInThread ()
+ {
+ try {
+ this.Run ();
+ } catch (ThreadAbortException) {
+ Thread.ResetAbort ();
+ Log.Debug ("Breaking out of UnixListener -- shutdown requested");
+ Shutdown.WorkerFinished (this);
+ }
+ }
+
public void Start ()
{
if (!initialized)
@@ -917,15 +928,7 @@
ExceptionHandlingThread.Start (new ThreadStart (this.HttpRun));
}
- ExceptionHandlingThread.Start (new ThreadStart (delegate () {
- try {
- this.Run ();
- } catch (ThreadAbortException) {
- Thread.ResetAbort ();
- Log.Debug ("Breaking out of UnixListener -- shutdown requested");
- Shutdown.WorkerFinished (this);
- }
- }));
+ ExceptionHandlingThread.Start (new ThreadStart (this.RunInThread));
}
private void StartWebserver ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]