~ubuntu-branches/ubuntu/intrepid/miro/intrepid

« back to all changes in this revision

Viewing changes to portable/libtorrent/include/libtorrent/asio/detail/null_event.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2008-02-09 13:37:10 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080209133710-9rs90q6gckvp1b6i
Tags: 1.1.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// null_event.hpp
 
3
// ~~~~~~~~~~~~~~
 
4
//
 
5
// Copyright (c) 2003-2007 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
 
 
11
#ifndef ASIO_DETAIL_NULL_EVENT_HPP
 
12
#define ASIO_DETAIL_NULL_EVENT_HPP
 
13
 
 
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
 
15
# pragma once
 
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
 
17
 
 
18
#include "asio/detail/push_options.hpp"
 
19
 
 
20
#include "asio/detail/push_options.hpp"
 
21
#include <boost/config.hpp>
 
22
#include "asio/detail/pop_options.hpp"
 
23
 
 
24
#if !defined(BOOST_HAS_THREADS)
 
25
 
 
26
#include "asio/detail/noncopyable.hpp"
 
27
 
 
28
namespace asio {
 
29
namespace detail {
 
30
 
 
31
class null_event
 
32
  : private noncopyable
 
33
{
 
34
public:
 
35
  // Constructor.
 
36
  null_event()
 
37
  {
 
38
  }
 
39
 
 
40
  // Destructor.
 
41
  ~null_event()
 
42
  {
 
43
  }
 
44
 
 
45
  // Signal the event.
 
46
  template <typename Lock>
 
47
  void signal(Lock&)
 
48
  {
 
49
  }
 
50
 
 
51
  // Reset the event.
 
52
  template <typename Lock>
 
53
  void clear(Lock&)
 
54
  {
 
55
  }
 
56
 
 
57
  // Wait for the event to become signalled.
 
58
  template <typename Lock>
 
59
  void wait(Lock&)
 
60
  {
 
61
  }
 
62
};
 
63
 
 
64
} // namespace detail
 
65
} // namespace asio
 
66
 
 
67
#endif // !defined(BOOST_HAS_THREADS)
 
68
 
 
69
#include "asio/detail/pop_options.hpp"
 
70
 
 
71
#endif // ASIO_DETAIL_NULL_EVENT_HPP