Commit b501c326 authored by Joseph Noir's avatar Joseph Noir

Rebase to develop branch

parent 2bc98de4
#include <iostream>
#include <chrono>
#include "caf/all.hpp"
#include "caf/chrono.hpp"
#include "caf/io/all.hpp"
using std::cout;
......
......@@ -2,10 +2,11 @@
* This example illustrates how to do time-triggered loops in libcaf. *
\ ******************************************************************************/
#include <chrono>
#include <iostream>
#include <algorithm>
#include "caf/all.hpp"
#include "caf/chrono.hpp"
using std::cout;
using std::endl;
......
......@@ -5,11 +5,11 @@
#include <map>
#include <vector>
#include <chrono>
#include <sstream>
#include <iostream>
#include "caf/all.hpp"
#include "caf/chrono.hpp"
using std::cout;
using std::cerr;
......
......@@ -24,11 +24,11 @@
#define CAF_CACHE_LINE_SIZE 64
#include <chrono>
#include <atomic>
#include <cassert>
#include "caf/thread.hpp"
#include "caf/chrono.hpp"
namespace caf {
namespace detail {
......
......@@ -85,7 +85,7 @@ class singletons {
static void stop_singletons();
private:
static mutex& get_mutex();
static mutex& get_plugin_mutex();
static std::atomic<abstract_singleton*>& get_plugin_singleton(size_t id);
......@@ -94,7 +94,7 @@ class singletons {
static T* lazy_get(std::atomic<T*>& ptr, mutex& mtx, Factory f) {
auto result = ptr.load(std::memory_order_acquire);
if (result == nullptr) {
lock_guard<mutex> guard(get_mutex());
lock_guard<mutex> guard(get_plugin_mutex());
result = ptr.load(std::memory_order_relaxed);
if (result == nullptr) {
result = f();
......
......@@ -22,11 +22,11 @@
#include <stack>
#include <atomic>
#include <chrono>
#include <iostream>
#include <functional>
#include "caf/all.hpp"
#include "caf/chrono.hpp"
using namespace std;
using namespace caf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment