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
faeb4508
Commit
faeb4508
authored
Dec 13, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile errors with GCC 4.7
parent
eb1452ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
libcaf_io/src/remote_actor.cpp
libcaf_io/src/remote_actor.cpp
+7
-1
unit_testing/test.cpp
unit_testing/test.cpp
+2
-2
unit_testing/test.hpp
unit_testing/test.hpp
+2
-2
No files found.
libcaf_io/src/remote_actor.cpp
View file @
faeb4508
...
...
@@ -45,13 +45,19 @@ abstract_actor_ptr remote_actor_impl(const std::set<std::string>& ifs,
std
::
promise
<
abstract_actor_ptr
>
res
;
basp_broker
::
client_handshake_data
hdata
{
invalid_node_id
,
&
res
,
&
ifs
};
mm
->
run_later
([
&
]
{
std
::
exception_ptr
eptr
;
try
{
auto
bro
=
mm
->
get_named_broker
<
basp_broker
>
(
atom
(
"_BASP"
));
auto
hdl
=
mm
->
backend
().
add_tcp_scribe
(
bro
.
get
(),
host
,
port
);
bro
->
init_client
(
hdl
,
&
hdata
);
}
catch
(...)
{
res
.
set_exception
(
std
::
current_exception
());
eptr
=
std
::
current_exception
();
}
// accessing `res` inside the catch block triggers
// a silly compiler error on GCC 4.7
if
(
eptr
)
{
res
.
set_exception
(
std
::
move
(
eptr
));
}
});
return
res
.
get_future
().
get
();
...
...
unit_testing/test.cpp
View file @
faeb4508
...
...
@@ -84,10 +84,10 @@ std::thread run_program_impl(const char* cpath, std::vector<std::string> args) {
}
oss
<<
to_dev_null
;
string
cmdstr
=
oss
.
str
();
return
thread
{
[
cmdstr
]
{
return
thread
(
[
cmdstr
]
{
if
(
system
(
cmdstr
.
c_str
())
!=
0
)
{
CAF_PRINTERR
(
"FATAL: command line failed: "
<<
cmdstr
);
abort
();
}
}
}
;
}
)
;
}
unit_testing/test.hpp
View file @
faeb4508
...
...
@@ -131,11 +131,11 @@ inline void caf_check_value(V1 v1, V2 v2, const char* fname, size_t line,
CAF_PRINT(#LineOfCode << " = " << (LineOfCode));
#define CAF_TEST(testname) \
::std::thread
{
[] { \
::std::thread
(
[] { \
::std::this_thread::sleep_for(std::chrono::seconds(10)); \
::std::cerr << "WATCHDOG: unit test did finish within 10s, abort\n"; \
::abort(); \
}
}
.detach(); \
}
)
.detach(); \
auto caf_test_scope_guard = ::caf::detail::make_scope_guard([] { \
std::cout << caf_error_count() << " error(s) detected" << std::endl; \
}); \
...
...
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