BEGIN_PROTOCOL_ENTRY3 (binary_protocol_collection_requested, TYPE_INT, generation, TYPE_SIZE, requested_size, TYPE_BOOL, force)
-FLUSH ()
DEFAULT_PRINT ()
IS_ALWAYS_MATCH (TRUE)
MATCH_INDEX (BINARY_PROTOCOL_MATCH)
}
#endif
+/*
+ * Flushing buffers takes an exclusive lock, so it must only be done when the world is
+ * stopped, otherwise we might end up with a deadlock because a stopped thread owns the
+ * lock.
+ *
+ * The protocol entries that do flush have `FLUSH()` in their definition.
+ */
void
binary_protocol_flush_buffers (gboolean force)
{