2018-12-15 01:28:11 +01:00
|
|
|
/*
|
|
|
|
* IXCancellationRequest.h
|
|
|
|
* Author: Benjamin Sergeant
|
|
|
|
* Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-01-03 21:53:44 +01:00
|
|
|
#include <atomic>
|
2019-05-30 17:46:50 +02:00
|
|
|
#include <functional>
|
2018-12-15 01:28:11 +01:00
|
|
|
|
2019-02-21 03:59:07 +01:00
|
|
|
namespace ix
|
2018-12-15 01:28:11 +01:00
|
|
|
{
|
|
|
|
using CancellationRequest = std::function<bool()>;
|
2019-01-03 21:53:44 +01:00
|
|
|
|
2019-05-30 17:46:50 +02:00
|
|
|
CancellationRequest makeCancellationRequestWithTimeout(
|
|
|
|
int seconds, std::atomic<bool>& requestInitCancellation);
|
|
|
|
} // namespace ix
|