Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
d4a01972
Commit
d4a01972
authored
Feb 18, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use const var for fiber::is_disabled_feature
parent
715e1999
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
cppa/spawn.hpp
cppa/spawn.hpp
+4
-4
cppa/util/fiber.hpp
cppa/util/fiber.hpp
+1
-1
src/fiber.cpp
src/fiber.cpp
+2
-6
No files found.
cppa/spawn.hpp
View file @
d4a01972
...
...
@@ -64,13 +64,13 @@ intrusive_ptr<C> spawn_impl(BeforeLaunch before_launch_fun, Ts&&... args) {
"top-level spawns cannot have monitor or link flag"
);
CPPA_LOGF_TRACE
(
"spawn "
<<
detail
::
demangle
<
C
>
());
// runtime check wheter context_switching_resume can be used,
// i.e., add the detached flag if libcppa
compiled without fiber support
// when using the blocking API
// i.e., add the detached flag if libcppa
was compiled
// w
ithout fiber support w
hen using the blocking API
if
(
has_blocking_api_flag
(
Os
)
&&
!
has_detach_flag
(
Os
)
&&
util
::
fiber
::
is_disabled_feature
()
)
{
&&
util
::
fiber
::
is_disabled_feature
)
{
return
spawn_impl
<
C
,
Os
+
detached
>
(
before_launch_fun
,
std
::
forward
<
Ts
>
(
args
)...);
std
::
forward
<
Ts
>
(
args
)...);
}
/*
using scheduling_policy = typename std::conditional<
...
...
cppa/util/fiber.hpp
View file @
d4a01972
...
...
@@ -44,7 +44,7 @@ struct fiber {
* @brief Queries whether libcppa was compiled without
* fiber support on this platform.
*/
static
bool
is_disabled_feature
()
;
static
const
bool
is_disabled_feature
;
/**
* @brief Creates a new fiber that describes stores the context
...
...
src/fiber.cpp
View file @
d4a01972
...
...
@@ -47,9 +47,7 @@ void fiber::swap(fiber&, fiber&) {
"CPPA_DISABLE_CONTEXT_SWITCHING"
);
}
bool
fiber
::
is_disabled_feature
()
{
return
true
;
}
const
bool
fiber
::
is_disabled_feature
=
true
;
}
}
// namespace cppa::util
...
...
@@ -220,9 +218,7 @@ fiber::~fiber() {
delete
m_impl
;
}
bool
fiber
::
is_disabled_feature
()
{
return
false
;
}
const
bool
fiber
::
is_disabled_feature
=
false
;
}
}
// namespace cppa::util
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment