#pragma once #include #include #include #include #include #include "sweepstore/utils/timing.h" #define STALE_HEARTBEAT_THRESHOLD_MS 5000 enum SweepstoreTicketOperation : int; class SweepstoreFileHandle; namespace SweepstoreConcurrency { void spawnTicket(SweepstoreFileHandle* file, const SweepstoreTicketOperation& operation, const uint32_t keyHash, const uint32_t targetSize, const std::function onApproved, std::string debugLabel = "" ); void initialiseMaster(std::string filePath); inline void initialiseMasterAsync(std::string filePath) { SWEEPSTORE_TIME_FUNCTION(); std::thread([filePath]() { initialiseMaster(filePath); }).detach(); } }