We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fefergrgrgrg/webdev-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
threadinterrupt.h•964 B
// Copyright (c) 2016-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_THREADINTERRUPT_H
#define BITCOIN_THREADINTERRUPT_H
#include <sync.h>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <mutex>
/*
A helper class for interruptible sleeps. Calling operator() will interrupt
any current sleep, and after that point operator bool() will return true
until reset.
*/
class CThreadInterrupt
{
public:
CThreadInterrupt();
explicit operator bool() const;
void operator()();
void reset();
bool sleep_for(std::chrono::milliseconds rel_time);
bool sleep_for(std::chrono::seconds rel_time);
bool sleep_for(std::chrono::minutes rel_time);
private:
std::condition_variable cond;
Mutex mut;
std::atomic<bool> flag;
};
#endif //BITCOIN_THREADINTERRUPT_H