123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef BOOST_COMPUTE_ASYNC_WAIT_GUARD_HPP
- #define BOOST_COMPUTE_ASYNC_WAIT_GUARD_HPP
- #include <boost/noncopyable.hpp>
- namespace boost {
- namespace compute {
- template<class Waitable>
- class wait_guard : boost::noncopyable
- {
- public:
-
- wait_guard(const Waitable &waitable)
- : m_waitable(waitable)
- {
- }
-
-
- ~wait_guard()
- {
- m_waitable.wait();
- }
- private:
- Waitable m_waitable;
- };
- }
- }
- #endif
|