| 1 | // Test for sp_thread_yield |
|---|---|
| 2 | // |
| 3 | // Copyright 2023 Peter Dimov |
| 4 | // Distributed under the Boost Software License, Version 1.0. |
| 5 | // https://www.boost.org/LICENSE_1_0.txt |
| 6 | |
| 7 | #include <boost/core/yield_primitives.hpp> |
| 8 | |
| 9 | int main() |
| 10 | { |
| 11 | for( int i = 0; i < 10000; ++i ) |
| 12 | { |
| 13 | boost::core::sp_thread_yield(); |
| 14 | } |
| 15 | } |
| 16 |
