summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-12-29 10:15:28 -0500
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 18:39:19 -0400
commit0c32c98f25f3f7d99a244a249dc08b03cd36a5b0 (patch)
treee4a1d61ebddaf24a21c246791acbd91bd20e136d /indra/llcommon/llevents.h
parent66981fab0b3c8dcc3a031d50710a2b24ec6b0603 (diff)
SL-793: Add LLEventPumps::clear() method to disconnect all listeners.
This is like the existing reset() method, except that reset() is specifically intended for shutdown: it disables every existing LLEventPump in such a way that it cannot be subsequently reused. (The original idea was to disconnect listeners in DLLs unloaded at shutdown.) clear() forcibly disconnects all existing listeners, but leaves LLEventPumps ready for reuse. This is useful (e.g.) for test programs to reset the state of LLEventPumps between individual test functions.
Diffstat (limited to 'indra/llcommon/llevents.h')
-rw-r--r--indra/llcommon/llevents.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llcommon/llevents.h b/indra/llcommon/llevents.h
index 62d97007ac..18525a8fa5 100644
--- a/indra/llcommon/llevents.h
+++ b/indra/llcommon/llevents.h
@@ -264,6 +264,11 @@ public:
void flush();
/**
+ * Disconnect listeners from all known LLEventPump instances
+ */
+ void clear();
+
+ /**
* Reset all known LLEventPump instances
* workaround for DEV-35406 crash on shutdown
*/
@@ -587,7 +592,7 @@ public:
private:
friend class LLEventPumps;
-
+ virtual void clear();
virtual void reset();