Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

null_event.hpp 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // detail/null_event.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ASIO_DETAIL_NULL_EVENT_HPP
  11. #define ASIO_DETAIL_NULL_EVENT_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #if !defined(ASIO_HAS_THREADS)
  17. #include "asio/detail/noncopyable.hpp"
  18. #include "asio/detail/push_options.hpp"
  19. namespace asio {
  20. namespace detail {
  21. class null_event
  22. : private noncopyable
  23. {
  24. public:
  25. // Constructor.
  26. null_event()
  27. {
  28. }
  29. // Destructor.
  30. ~null_event()
  31. {
  32. }
  33. // Signal the event. (Retained for backward compatibility.)
  34. template <typename Lock>
  35. void signal(Lock&)
  36. {
  37. }
  38. // Signal all waiters.
  39. template <typename Lock>
  40. void signal_all(Lock&)
  41. {
  42. }
  43. // Unlock the mutex and signal one waiter.
  44. template <typename Lock>
  45. void unlock_and_signal_one(Lock&)
  46. {
  47. }
  48. // If there's a waiter, unlock the mutex and signal it.
  49. template <typename Lock>
  50. bool maybe_unlock_and_signal_one(Lock&)
  51. {
  52. return false;
  53. }
  54. // Reset the event.
  55. template <typename Lock>
  56. void clear(Lock&)
  57. {
  58. }
  59. // Wait for the event to become signalled.
  60. template <typename Lock>
  61. void wait(Lock&)
  62. {
  63. }
  64. };
  65. } // namespace detail
  66. } // namespace asio
  67. #include "asio/detail/pop_options.hpp"
  68. #endif // !defined(ASIO_HAS_THREADS)
  69. #endif // ASIO_DETAIL_NULL_EVENT_HPP