- * Set to #GNUNET_YES if the set service should not free the
- * operation, as it is still needed (e.g. in some scheduled task).
+ * Incremented whenever (during shutdown) some component still
+ * needs to do something with this before the operation is freed.
+ * (Used as a reference counter, but only during termination.)
+ */
+ unsigned int keep;
+};
+
+
+/**
+ * SetContent stores the actual set elements,
+ * which may be shared by multiple generations derived
+ * from one set.
+ */
+struct SetContent
+{
+ /**
+ * Number of references to the content.
+ */
+ unsigned int refcount;
+
+ /**
+ * Maps `struct GNUNET_HashCode *` to `struct ElementEntry *`.
+ */
+ struct GNUNET_CONTAINER_MultiHashMap *elements;
+
+ unsigned int latest_generation;
+
+ /**
+ * Mutations requested by the client that we're
+ * unable to execute right now because we're iterating
+ * over the underlying hash map of elements.
+ */
+ struct PendingMutation *pending_mutations_head;
+
+ /**
+ * Mutations requested by the client that we're
+ * unable to execute right now because we're iterating
+ * over the underlying hash map of elements.
+ */
+ struct PendingMutation *pending_mutations_tail;
+
+ /**
+ * Number of concurrently active iterators.