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 ()
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list
Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development
mailing list. Email [EMAIL PROTECTED] if interested.