Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET
Apache Qpid Documentation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qpid
sys
Thread.h
Go to the documentation of this file.
1
#ifndef _sys_Thread_h
2
#define _sys_Thread_h
3
4
/*
5
*
6
* Licensed to the Apache Software Foundation (ASF) under one
7
* or more contributor license agreements. See the NOTICE file
8
* distributed with this work for additional information
9
* regarding copyright ownership. The ASF licenses this file
10
* to you under the Apache License, Version 2.0 (the
11
* "License"); you may not use this file except in compliance
12
* with the License. You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing,
17
* software distributed under the License is distributed on an
18
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
* KIND, either express or implied. See the License for the
20
* specific language governing permissions and limitations
21
* under the License.
22
*
23
*/
24
#include <boost/shared_ptr.hpp>
25
#include "
qpid/CommonImportExport.h
"
26
27
#ifdef _WIN32
28
# ifdef _MSC_VER
29
# define QPID_TSS __declspec(thread)
30
# else
31
# define QPID_TSS __thread
32
# endif
33
#elif defined (__GNUC__)
34
# define QPID_TSS __thread
35
#elif defined (__SUNPRO_CC)
36
# define QPID_TSS __thread
37
#else
38
# error "Dont know how to define QPID_TSS for this platform"
39
#endif
40
41
namespace
qpid {
42
namespace
sys {
43
44
class
Runnable;
45
class
ThreadPrivate;
46
47
class
Thread
48
{
49
boost::shared_ptr<ThreadPrivate> impl;
50
51
public
:
52
QPID_COMMON_EXTERN
Thread
();
53
QPID_COMMON_EXTERN
explicit
Thread
(
qpid::sys::Runnable
*);
54
QPID_COMMON_EXTERN
explicit
Thread
(
qpid::sys::Runnable
&);
55
56
QPID_COMMON_EXTERN
operator
bool();
57
QPID_COMMON_EXTERN
bool
operator==
(
const
Thread&)
const
;
58
QPID_COMMON_EXTERN
bool
operator!=
(
const
Thread&)
const
;
59
60
QPID_COMMON_EXTERN
void
join
();
61
62
QPID_COMMON_EXTERN
static
Thread
current
();
63
67
QPID_COMMON_EXTERN
static
unsigned
long
logId
();
68
};
69
70
}}
71
#endif
Qpid C++ API Reference
Generated on Tue Jan 29 2013 for Qpid C++ Client API by
1.8.3