gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] branch master updated: notify main thread a


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated: notify main thread about thread termination for instant clean up
Date: Sat, 20 Oct 2018 12:45:25 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 47281241 notify main thread about thread termination for instant clean 
up
47281241 is described below

commit 4728124102d38067bd2e497b216b12aaee6dea53
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Oct 20 12:45:21 2018 +0200

    notify main thread about thread termination for instant clean up
---
 ChangeLog               |  5 +++++
 src/microhttpd/daemon.c | 10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b8d2c8f5..e623d4c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Oct 20 12:44:16 CEST 2018
+       In thread-per-connection mode, signal main thread for
+       thread termination for instant clean-up and application
+       notification about closed connections. -CG
+
 Tue Oct 16 20:43:41 CEST 2018
        Add MHD_RF_HTTP_VERSION_1_0_RESPONSE option to make MHD
        act more like an HTTP/1.0 server. -GH
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 4999da50..0480af95 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2097,6 +2097,14 @@ exit:
        * To avoid data races, do not close socket here. Daemon will
        * use more connections only after cleanup anyway. */
     }
+  if ( (MHD_ITC_IS_VALID_(daemon->itc)) &&
+       (! MHD_itc_activate_ (daemon->itc, "t")) )
+    {
+#ifdef HAVE_MESSAGES
+      MHD_DLOG (daemon,
+                _("Failed to signal thread termination via inter-thread 
communication channel."));
+#endif
+    }
   return (MHD_THRD_RTRN_TYPE_) 0;
 }
 
@@ -4502,8 +4510,8 @@ static MHD_THRD_RTRN_TYPE_ MHD_THRD_CALL_SPEC_
 MHD_polling_thread (void *cls)
 {
   struct MHD_Daemon *daemon = cls;
-  MHD_thread_init_(&(daemon->pid));
 
+  MHD_thread_init_(&(daemon->pid));
   while (! daemon->shutdown)
     {
       if (0 != (daemon->options & MHD_USE_POLL))

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]