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
8a3069a4
Commit
8a3069a4
authored
Jun 11, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'unstable' of github.com:Neverlord/libcppa into unstable
parents
71e33889
755c7721
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
6 deletions
+13
-6
cppa/detail/buffer.hpp
cppa/detail/buffer.hpp
+1
-1
cppa/detail/matches.hpp
cppa/detail/matches.hpp
+1
-0
cppa/detail/thread.hpp
cppa/detail/thread.hpp
+5
-1
cppa/detail/type_to_ptype.hpp
cppa/detail/type_to_ptype.hpp
+1
-0
cppa/util/fiber.hpp
cppa/util/fiber.hpp
+3
-2
src/thread_pool_scheduler.cpp
src/thread_pool_scheduler.cpp
+2
-2
No files found.
cppa/detail/buffer.hpp
View file @
8a3069a4
...
@@ -54,7 +54,7 @@ class buffer {
...
@@ -54,7 +54,7 @@ class buffer {
if
(
recv_result
==
0
)
{
if
(
recv_result
==
0
)
{
// connection closed
// connection closed
if
(
throw_on_error
)
{
if
(
throw_on_error
)
{
std
::
ios_base
::
failure
(
"cannot read from a closed pipe/socket"
);
throw
std
::
ios_base
::
failure
(
"cannot read from a closed pipe/socket"
);
}
}
return
false
;
return
false
;
}
}
...
...
cppa/detail/matches.hpp
View file @
8a3069a4
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#ifndef MATCHES_HPP
#ifndef MATCHES_HPP
#define MATCHES_HPP
#define MATCHES_HPP
#include <numeric>
#include "cppa/pattern.hpp"
#include "cppa/pattern.hpp"
#include "cppa/any_tuple.hpp"
#include "cppa/any_tuple.hpp"
...
...
cppa/detail/thread.hpp
View file @
8a3069a4
...
@@ -31,7 +31,9 @@
...
@@ -31,7 +31,9 @@
#ifndef THREAD_HPP
#ifndef THREAD_HPP
#define THREAD_HPP
#define THREAD_HPP
#ifdef __APPLE__
#if defined(__APPLE__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)
#define CPPA_USE_BOOST_THREADS
#include <boost/thread.hpp>
#include <boost/thread.hpp>
#include "cppa/util/duration.hpp"
#include "cppa/util/duration.hpp"
...
@@ -80,6 +82,8 @@ inline boost::system_time& operator+=(boost::system_time& lhs,
...
@@ -80,6 +82,8 @@ inline boost::system_time& operator+=(boost::system_time& lhs,
#else
#else
#define CPPA_USE_STD_THREADS
#include <mutex>
#include <mutex>
#include <thread>
#include <thread>
#include <condition_variable>
#include <condition_variable>
...
...
cppa/detail/type_to_ptype.hpp
View file @
8a3069a4
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#ifndef TYPE_TO_PTYPE_HPP
#ifndef TYPE_TO_PTYPE_HPP
#define TYPE_TO_PTYPE_HPP
#define TYPE_TO_PTYPE_HPP
#include <string>
#include <cstdint>
#include <cstdint>
#include <type_traits>
#include <type_traits>
...
...
cppa/util/fiber.hpp
View file @
8a3069a4
...
@@ -42,10 +42,11 @@
...
@@ -42,10 +42,11 @@
#ifdef CPPA_DISABLE_CONTEXT_SWITCHING
#ifdef CPPA_DISABLE_CONTEXT_SWITCHING
namespace
cppa
{
namespace
util
{
namespace
cppa
{
namespace
util
{
struct
fiber
{
class
fiber
{
public:
inline
static
void
swap
(
fiber
&
,
fiber
&
)
{
}
inline
static
void
swap
(
fiber
&
,
fiber
&
)
{
}
};
};
}
}
}
}
// namespace cppa::util
#elif defined(CPPA_USE_UCONTEXT_IMPL)
#elif defined(CPPA_USE_UCONTEXT_IMPL)
...
...
src/thread_pool_scheduler.cpp
View file @
8a3069a4
...
@@ -90,7 +90,7 @@ struct thread_pool_scheduler::worker {
...
@@ -90,7 +90,7 @@ struct thread_pool_scheduler::worker {
if
(
result
)
{
if
(
result
)
{
return
result
;
return
result
;
}
}
# ifdef
__APPLE__
# ifdef
CPPA_USE_BOOST_THREADS
auto
timeout
=
boost
::
get_system_time
();
auto
timeout
=
boost
::
get_system_time
();
timeout
+=
boost
::
posix_time
::
milliseconds
(
1
);
timeout
+=
boost
::
posix_time
::
milliseconds
(
1
);
boost
::
this_thread
::
sleep
(
timeout
);
boost
::
this_thread
::
sleep
(
timeout
);
...
@@ -108,7 +108,7 @@ struct thread_pool_scheduler::worker {
...
@@ -108,7 +108,7 @@ struct thread_pool_scheduler::worker {
if
(
result
)
{
if
(
result
)
{
return
result
;
return
result
;
}
}
# ifdef
__APPLE__
# ifdef
CPPA_USE_BOOST_THREADS
auto
timeout
=
boost
::
get_system_time
();
auto
timeout
=
boost
::
get_system_time
();
timeout
+=
boost
::
posix_time
::
milliseconds
(
10
);
timeout
+=
boost
::
posix_time
::
milliseconds
(
10
);
boost
::
this_thread
::
sleep
(
timeout
);
boost
::
this_thread
::
sleep
(
timeout
);
...
...
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