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
8c635fcd
Commit
8c635fcd
authored
Mar 28, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OpenSSL manager forward declarations
parent
30d50ed2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
19 deletions
+40
-19
libcaf_core/caf/actor_system.hpp
libcaf_core/caf/actor_system.hpp
+11
-5
libcaf_core/caf/fwd.hpp
libcaf_core/caf/fwd.hpp
+9
-0
libcaf_core/src/actor_system.cpp
libcaf_core/src/actor_system.cpp
+20
-14
No files found.
libcaf_core/caf/actor_system.hpp
View file @
8c635fcd
...
@@ -165,6 +165,7 @@ public:
...
@@ -165,6 +165,7 @@ public:
scheduler
,
scheduler
,
middleman
,
middleman
,
opencl_manager
,
opencl_manager
,
openssl_manager
,
num_ids
num_ids
};
};
...
@@ -287,12 +288,19 @@ public:
...
@@ -287,12 +288,19 @@ public:
/// @throws `std::logic_error` if module is not loaded.
/// @throws `std::logic_error` if module is not loaded.
io
::
middleman
&
middleman
();
io
::
middleman
&
middleman
();
/// Returns the opencl manager instance from opencl module.
/// Returns `true` if the opencl module is available, `false` otherwise.
bool
has_opencl_manager
()
const
;
/// Returns the manager instance from the OpenCL module.
/// @throws `std::logic_error` if module is not loaded.
/// @throws `std::logic_error` if module is not loaded.
opencl
::
manager
&
opencl_manager
()
const
;
opencl
::
manager
&
opencl_manager
()
const
;
/// Returns `true` if the opencl module is available, `false` otherwise.
/// Returns `true` if the openssl module is available, `false` otherwise.
bool
has_opencl_manager
()
const
;
bool
has_openssl_manager
()
const
;
/// Returns the manager instance from the OpenSSL module.
/// @throws `std::logic_error` if module is not loaded.
openssl
::
manager
&
openssl_manager
()
const
;
/// Returns a dummy execution unit that forwards
/// Returns a dummy execution unit that forwards
/// everything to the scheduler.
/// everything to the scheduler.
...
@@ -558,9 +566,7 @@ private:
...
@@ -558,9 +566,7 @@ private:
actor_registry
registry_
;
actor_registry
registry_
;
group_manager
groups_
;
group_manager
groups_
;
module_array
modules_
;
module_array
modules_
;
io
::
middleman
*
middleman_
;
scoped_execution_unit
dummy_execution_unit_
;
scoped_execution_unit
dummy_execution_unit_
;
opencl
::
manager
*
opencl_manager_
;
bool
await_actors_before_shutdown_
;
bool
await_actors_before_shutdown_
;
// Stores SpawnServ, ConfigServ, and StreamServ
// Stores SpawnServ, ConfigServ, and StreamServ
std
::
array
<
strong_actor_ptr
,
num_internal_actors
>
internal_actors_
;
std
::
array
<
strong_actor_ptr
,
num_internal_actors
>
internal_actors_
;
...
...
libcaf_core/caf/fwd.hpp
View file @
8c635fcd
...
@@ -167,6 +167,15 @@ class abstract_coordinator;
...
@@ -167,6 +167,15 @@ class abstract_coordinator;
}
// namespace scheduler
}
// namespace scheduler
// -- OpenSSL classes ----------------------------------------------------------
namespace
openssl
{
class
manager
;
}
// namespace openssl
// -- detail classes -----------------------------------------------------------
// -- detail classes -----------------------------------------------------------
namespace
detail
{
namespace
detail
{
...
...
libcaf_core/src/actor_system.cpp
View file @
8c635fcd
...
@@ -209,7 +209,6 @@ actor_system::actor_system(actor_system_config& cfg)
...
@@ -209,7 +209,6 @@ actor_system::actor_system(actor_system_config& cfg)
logger_
(
new
caf
::
logger
(
*
this
),
false
),
logger_
(
new
caf
::
logger
(
*
this
),
false
),
registry_
(
*
this
),
registry_
(
*
this
),
groups_
(
*
this
),
groups_
(
*
this
),
middleman_
(
nullptr
),
dummy_execution_unit_
(
this
),
dummy_execution_unit_
(
this
),
await_actors_before_shutdown_
(
true
),
await_actors_before_shutdown_
(
true
),
detached
(
0
),
detached
(
0
),
...
@@ -220,12 +219,6 @@ actor_system::actor_system(actor_system_config& cfg)
...
@@ -220,12 +219,6 @@ actor_system::actor_system(actor_system_config& cfg)
auto
mod_ptr
=
f
(
*
this
);
auto
mod_ptr
=
f
(
*
this
);
modules_
[
mod_ptr
->
id
()].
reset
(
mod_ptr
);
modules_
[
mod_ptr
->
id
()].
reset
(
mod_ptr
);
}
}
auto
&
mmptr
=
modules_
[
module
::
middleman
];
if
(
mmptr
)
middleman_
=
reinterpret_cast
<
io
::
middleman
*>
(
mmptr
->
subtype_ptr
());
auto
&
clptr
=
modules_
[
module
::
opencl_manager
];
if
(
clptr
)
opencl_manager_
=
reinterpret_cast
<
opencl
::
manager
*>
(
clptr
->
subtype_ptr
());
auto
&
sched
=
modules_
[
module
::
scheduler
];
auto
&
sched
=
modules_
[
module
::
scheduler
];
using
test
=
scheduler
::
test_coordinator
;
using
test
=
scheduler
::
test_coordinator
;
using
share
=
scheduler
::
coordinator
<
policy
::
work_sharing
>
;
using
share
=
scheduler
::
coordinator
<
policy
::
work_sharing
>
;
...
@@ -359,23 +352,36 @@ group_manager& actor_system::groups() {
...
@@ -359,23 +352,36 @@ group_manager& actor_system::groups() {
}
}
bool
actor_system
::
has_middleman
()
const
{
bool
actor_system
::
has_middleman
()
const
{
return
m
iddleman_
!=
nullptr
;
return
m
odules_
[
module
::
middleman
]
!=
nullptr
;
}
}
io
::
middleman
&
actor_system
::
middleman
()
{
io
::
middleman
&
actor_system
::
middleman
()
{
if
(
middleman_
==
nullptr
)
auto
&
clptr
=
modules_
[
module
::
middleman
];
CAF_RAISE_ERROR
(
"cannot access middleman: module not loaded"
);
if
(
!
clptr
)
return
*
middleman_
;
CAF_RAISE_ERROR
(
"cannot access opencl manager: module not loaded"
);
return
*
reinterpret_cast
<
io
::
middleman
*>
(
clptr
->
subtype_ptr
());
}
}
bool
actor_system
::
has_opencl_manager
()
const
{
bool
actor_system
::
has_opencl_manager
()
const
{
return
opencl_manager_
!=
nullptr
;
return
modules_
[
module
::
opencl_manager
]
!=
nullptr
;
}
}
opencl
::
manager
&
actor_system
::
opencl_manager
()
const
{
opencl
::
manager
&
actor_system
::
opencl_manager
()
const
{
if
(
opencl_manager_
==
nullptr
)
auto
&
clptr
=
modules_
[
module
::
opencl_manager
];
if
(
!
clptr
)
CAF_RAISE_ERROR
(
"cannot access opencl manager: module not loaded"
);
CAF_RAISE_ERROR
(
"cannot access opencl manager: module not loaded"
);
return
*
opencl_manager_
;
return
*
reinterpret_cast
<
opencl
::
manager
*>
(
clptr
->
subtype_ptr
());
}
bool
actor_system
::
has_openssl_manager
()
const
{
return
modules_
[
module
::
openssl_manager
]
!=
nullptr
;
}
openssl
::
manager
&
actor_system
::
openssl_manager
()
const
{
auto
&
clptr
=
modules_
[
module
::
openssl_manager
];
if
(
!
clptr
)
CAF_RAISE_ERROR
(
"cannot access openssl manager: module not loaded"
);
return
*
reinterpret_cast
<
openssl
::
manager
*>
(
clptr
->
subtype_ptr
());
}
}
scoped_execution_unit
*
actor_system
::
dummy_execution_unit
()
{
scoped_execution_unit
*
actor_system
::
dummy_execution_unit
()
{
...
...
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