~cmiller/ubuntu/quantal/deluge/fix-parameter-move-storage

« back to all changes in this revision

Viewing changes to libtorrent/include/asio/detail/null_thread.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2009-11-13 02:39:45 UTC
  • mfrom: (4.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091113023945-te1bybo2912ejzuc
Tags: 1.2.0~rc3-4
* debian/control: bump build-dep on python-setuptools to (>= 0.6c9).
* debian/patches:
  - 25_r5921_fastresume_files.patch
    new, should fix problems with fresh configs;
  - 30_r5931_ipc_lockfile.patch:
    new, should fix an issue where Deluge will fail to start if there is a
    stale ipc lockfile. (Closes: #555849)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// null_thread.hpp
3
 
// ~~~~~~~~~~~~~~~
4
 
//
5
 
// Copyright (c) 2003-2008 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_THREAD_HPP
12
 
#define ASIO_DETAIL_NULL_THREAD_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/push_options.hpp"
27
 
#include <boost/throw_exception.hpp>
28
 
#include "asio/detail/pop_options.hpp"
29
 
 
30
 
#include "asio/error.hpp"
31
 
#include "asio/system_error.hpp"
32
 
#include "asio/detail/noncopyable.hpp"
33
 
 
34
 
namespace asio {
35
 
namespace detail {
36
 
 
37
 
class null_thread
38
 
  : private noncopyable
39
 
{
40
 
public:
41
 
  // Constructor.
42
 
  template <typename Function>
43
 
  null_thread(Function f)
44
 
  {
45
 
    asio::system_error e(
46
 
        asio::error::operation_not_supported, "thread");
47
 
    boost::throw_exception(e);
48
 
  }
49
 
 
50
 
  // Destructor.
51
 
  ~null_thread()
52
 
  {
53
 
  }
54
 
 
55
 
  // Wait for the thread to exit.
56
 
  void join()
57
 
  {
58
 
  }
59
 
};
60
 
 
61
 
} // namespace detail
62
 
} // namespace asio
63
 
 
64
 
#endif // !defined(BOOST_HAS_THREADS)
65
 
 
66
 
#include "asio/detail/pop_options.hpp"
67
 
 
68
 
#endif // ASIO_DETAIL_NULL_THREAD_HPP