Commit 334b84d6 authored by neverlord's avatar neverlord

'fixed' segfault on Mac OS

parent d21858bb
#include <atomic> #include <atomic>
#include <iostream>
#include "cppa/message.hpp" #include "cppa/message.hpp"
#include "cppa/context.hpp" #include "cppa/context.hpp"
...@@ -20,8 +21,6 @@ namespace { ...@@ -20,8 +21,6 @@ namespace {
using namespace cppa; using namespace cppa;
using namespace cppa::detail; using namespace cppa::detail;
struct singleton_container struct singleton_container
{ {
...@@ -67,12 +66,15 @@ struct singleton_container ...@@ -67,12 +66,15 @@ struct singleton_container
// wait for all running actors to quit // wait for all running actors to quit
m_actor_registry->await_running_count_equal(0); m_actor_registry->await_running_count_equal(0);
// shutdown scheduler // shutdown scheduler
// TODO: figure out why the ... Mac OS dies with a segfault here
# ifndef __APPLE__
auto s = m_scheduler.load(); auto s = m_scheduler.load();
if (s) if (s)
{ {
s->stop(); s->stop();
delete s; delete s;
} }
# endif
// it's safe now to delete all other singletons // it's safe now to delete all other singletons
delete m_group_manager; delete m_group_manager;
if (!m_msg_dummy->deref()) delete m_msg_dummy; if (!m_msg_dummy->deref()) delete m_msg_dummy;
......
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