-
Add CMake find module for hiredis and libev
-
Ignoring strict aliasing in some usages of libev macros.
-
With compiler warning -Wstrict-aliasing enabled, usage of the macros ev_async_timer and ev_timer_init yields said warnings. Created templates to locally turn off these warnings. Compiles without warnings with gcc 4.9.2 and clang 3.5.
-
Fixes for Multi-Threading (bdallas)
-
From @bveldhoen, PR #25 4a964d09dbe1ce58ac0318ea719752721f174804
-
* Use lock_guard instead of unique_lock when possible * Make a few types non-atomic since they are already guarded by a mutex * Create setVariable helpers that lock and notify
-
…ed to and has no locking anyway so this will be the same functionality.
-
…ill make debugging easier if the error condition does occur.
-
…wise problems could occur where you increment, then fetch and get the wrong number.
-
Very similar to the fixes for Command and Subscriber, adds locking around booleans used as flags for condition variables.
-
Similar to the fixes for subscriber, without holding the waiter_lock_, updating the waiting_done_ flag may cause deadlock. In the deadlock example below, Thread1 is waiting for the response, thread 2 is processing the response and updating the waiter_lock_ variable: ---------------------------------------------------- | Thread 1 | Thread 2 | ---------------------------------------------------- | locks 'waiter_lock_' | | | check 'waiting_done_' | | | | Update 'waiting done' | | | Send notification | | begin waiting for signal | | | *deadlocked* | | ----------------------------------------------------
-
The lock used with the condition variable should always be the same one guarding changes to the condition itself, in these cases, the lock guarding changes to the subscribe and psubscibe data structures. This commit also limits the number of locks held by the subscribeBase function at any one time.
-
Set CMAKE_INSTALL_PREFIX only when not externally set
-
In case of a connection failure (i.e. specify incorrect port number), the main thread would be blocked. This is fixed by setting the condition variables correctly in case of a connection error. The test TestConnectionFailure will hang without this fix.
-
Add EVRUN_ONCE evloop call at the start of the event loop thread, instead of just an EVRUN_NOWAIT call. We want to block until the connection happens, or else we hang on the condition variable wait.
-
Fix logger include path
-
Fix the path for logger.hpp, otherwise make install fails. Change-Id: I50aa9667e512c4fdf6de471dc16312d9eb3dbe30