This commit is contained in:
jeanlemotan
2024-07-02 18:13:47 +02:00
commit bbeaa887cd
173 changed files with 34365 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) Lewis Baker
// Licenced under MIT license. See LICENSE.txt for details.
///////////////////////////////////////////////////////////////////////////////
#ifndef CPPCORO_SPIN_WAIT_HPP_INCLUDED
#define CPPCORO_SPIN_WAIT_HPP_INCLUDED
#include <cstdint>
namespace cppcoro
{
class spin_wait
{
public:
spin_wait() noexcept;
bool next_spin_will_yield() const noexcept;
void spin_one() noexcept;
void reset() noexcept;
private:
std::uint32_t m_count;
};
}
#endif