FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
thread/src/future.cpp at develop · boostorg/thread · GitHub
boostorg
/
thread
Public
Notifications
You must be signed in to change notification settings
Fork
171
Star
213
Code
Issues
77
Pull requests
13
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
thread
/
src
/
future.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
64 lines (53 loc) · 1.83 KB
Breadcrumbs
thread
/
src
/
future.cpp
Copy path
File metadata and controls
64 lines (53 loc) · 1.83 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
(C) Copyright 2012 Vicente J. Botet Escriba
//
Use, modification and distribution are subject to the
//
Boost Software License, Version 1.0. (See accompanying file
//
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
include
<
boost/thread/detail/config.hpp
>
#
ifndef
BOOST_NO_EXCEPTIONS
#
include
<
boost/thread/futures/future_error_code.hpp
>
#
include
<
string
>
namespace
boost
{
namespace
thread_detail
{
class
future_error_category
:
public boost::system::error_category
{
public:
virtual
const
char
*
name
()
const
BOOST_NOEXCEPT;
virtual
std::string
message
(
int
ev)
const
;
};
const
char
*
future_error_category::name
()
const
BOOST_NOEXCEPT
{
return
"
future
"
;
}
std::string
future_error_category::message
(
int
ev)
const
{
switch
(
BOOST_SCOPED_ENUM_NATIVE
(future_errc)(ev))
{
case
future_errc::broken_promise:
return
std::string
(
"
The associated promise has been destructed prior
"
"
to the associated state becoming ready.
"
);
case
future_errc::future_already_retrieved:
return
std::string
(
"
The future has already been retrieved from
"
"
the promise or packaged_task.
"
);
case
future_errc::promise_already_satisfied:
return
std::string
(
"
The state of the promise has already been set.
"
);
case
future_errc::no_state:
return
std::string
(
"
Operation not permitted on an object without
"
"
an associated state.
"
);
}
return
std::string
(
"
unspecified future_errc value
\n
"
);
}
future_error_category future_error_category_var;
}
BOOST_THREAD_DECL
const
system::error_category&
future_category
()
BOOST_NOEXCEPT
{
return
thread_detail::future_error_category_var;
}
}
#
endif
Back
|
FazBrowse Home
|
New Git URL