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
59aa1fa3
Commit
59aa1fa3
authored
Sep 02, 2011
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed usage of detached hint in thread_pool_scheduler
parent
54738d06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/scheduler.cpp
src/scheduler.cpp
+3
-2
src/thread_pool_scheduler.cpp
src/thread_pool_scheduler.cpp
+1
-1
No files found.
src/scheduler.cpp
View file @
59aa1fa3
...
...
@@ -13,9 +13,9 @@
namespace
{
//std::mutex m_instance_mtx;
std
::
atomic
<
cppa
::
scheduler
*>
m_instance
;
/*
struct static_cleanup_helper
{
~static_cleanup_helper()
...
...
@@ -32,6 +32,7 @@ struct static_cleanup_helper
}
}
s_cleanup_helper;
*/
}
// namespace <anonymous>
...
...
@@ -71,7 +72,7 @@ void set_scheduler(scheduler* sched)
scheduler
*
s
=
nullptr
;
if
(
m_instance
.
compare_exchange_weak
(
s
,
sched
)
==
false
)
{
throw
std
::
runtime_error
(
"
cannot set scheduler
"
);
throw
std
::
runtime_error
(
"
scheduler already set
"
);
}
}
...
...
src/thread_pool_scheduler.cpp
View file @
59aa1fa3
...
...
@@ -178,7 +178,7 @@ void thread_pool_scheduler::schedule(scheduled_actor* what)
actor_ptr
thread_pool_scheduler
::
spawn
(
actor_behavior
*
behavior
,
scheduling_hint
hint
)
{
if
(
hint
==
schedul
ed
)
if
(
hint
==
detach
ed
)
{
return
mock_scheduler
::
spawn
(
behavior
);
}
...
...
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