From a7948c4d796e4d1c47433b8ed77304a200e9e353 Mon Sep 17 00:00:00 2001 From: Graham Tremper Date: Wed, 11 Feb 2015 12:46:43 -0800 Subject: [PATCH 1/2] Add virtual destructor to AutoNetTransport --- autowiring/AutoNetServer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autowiring/AutoNetServer.h b/autowiring/AutoNetServer.h index 04bbc0053..b059d318b 100644 --- a/autowiring/AutoNetServer.h +++ b/autowiring/AutoNetServer.h @@ -22,6 +22,8 @@ class AutoNetTransportHandler { /// class AutoNetTransport { public: + virtual ~AutoNetTransport(void){} + /// /// Causes the transport to begin servicing user requests /// From 8b7890da9de7b6d5b1dedafb18b67779f533e338 Mon Sep 17 00:00:00 2001 From: Jason Lokerson Date: Wed, 11 Feb 2015 12:50:35 -0800 Subject: [PATCH 2/2] Correcting missing type issue on libcxx All that's needed here is a barrier of some kind, a pointless lock acquisition is sufficient to do this. --- src/autowiring/BasicThread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/autowiring/BasicThread.cpp b/src/autowiring/BasicThread.cpp index d7b859aed..561be85e2 100644 --- a/src/autowiring/BasicThread.cpp +++ b/src/autowiring/BasicThread.cpp @@ -71,7 +71,11 @@ void BasicThread::DoRunLoopCleanup(std::shared_ptr&& ctxt, std::sha m_running = false; // Need to ensure that "stop" and "running" are actually updated in memory before we mark "complete" +#if autowiring_USE_LIBCXX std::atomic_thread_fence(std::memory_order_release); +#else + (std::lock_guard)state->m_lock; +#endif m_completed = true; // Tell our CoreRunnable parent that we're done to ensure that our reference count will be cleared.