[PATCH] DOC: Documentation for start_poll_thread() and stop_poll_thread().
Dominik Vogt
dvogt at ffm.tc.iot.dtag.de
Mon Aug 2 13:58:22 CEST 2010
---
include/snmp_pp/uxsnmp.h | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/include/snmp_pp/uxsnmp.h b/include/snmp_pp/uxsnmp.h
index 6c9f3b7..e7da1c5 100644
--- a/include/snmp_pp/uxsnmp.h
+++ b/include/snmp_pp/uxsnmp.h
@@ -546,7 +546,29 @@ class DLLOPT Snmp: public SnmpSynchronized
const IpAddress &get_listen_address() const {return listen_address; };
+ /**
+ * Stop one thread listening for responses and notifications.
+ * This method is used to start response and notification processing in a
+ * multi threadded setup.
+ *
+ * Note: start_poll_thread() itself is not thread safe. The caller must make
+ * sure that only one thread is calling start_poll_thread() or
+ * stop_poll_thread at any point time.
+ *
+ * @param select_simeout - Timeout for each call of the select() system call.
+ *
+ * @return true if the thread is now running and false if it failed to start.
+ */
bool start_poll_thread(const int select_timeout);
+
+ /**
+ * Stop the thread listening for responses and notifications.
+ * This method is used to stop the thread started with start_poll_thread().
+ *
+ * Note: stop_poll_thread() itself is not thread safe. The caller must make
+ * sure that only one thread is calling start_poll_thread() or
+ * stop_poll_thread at any point time.
+ */
void stop_poll_thread();
EventListHolder *get_eventListHolder() { return eventListHolder; };
--
1.5.5.6
--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment;
filename="0007-SHUTDOWN-Don-t-call-pthread_exit-to-prevent-call.patch"
More information about the AGENTPP
mailing list