danicoin/src/System/ContextGroup.h
2016-01-18 15:33:29 +00:00

29 lines
711 B
C++
Executable file

// Copyright (c) 2011-2016 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
#include <System/Dispatcher.h>
namespace System {
class ContextGroup {
public:
explicit ContextGroup(Dispatcher& dispatcher);
ContextGroup(const ContextGroup&) = delete;
ContextGroup(ContextGroup&& other);
~ContextGroup();
ContextGroup& operator=(const ContextGroup&) = delete;
ContextGroup& operator=(ContextGroup&& other);
void interrupt();
void spawn(std::function<void()>&& procedure);
void wait();
private:
Dispatcher* dispatcher;
NativeContextGroup contextGroup;
};
}