webrtc_m130/webrtc/base/sigslot.cc
deadbeef 8d517c4170 Rewrite of sigslot that avoids vtables.
This reduces binary size considerably and solves some other problems.

Also rewrote using variadic templates.

Initial patch contributed by andrey.semashev@gmail.com.

BUG=webrtc:2305

Review-Url: https://codereview.webrtc.org/2509733003
Cr-Commit-Position: refs/heads/master@{#16703}
2017-02-19 22:12:24 +00:00

23 lines
554 B
C++

// sigslot.h: Signal/Slot classes
//
// Written by Sarah Thompson (sarah@telergy.com) 2002.
//
// License: Public domain. You are free to use this code however you like, with
// the proviso that the author takes on no responsibility or liability for any
// use.
#include "webrtc/base/sigslot.h"
namespace sigslot {
#ifdef _SIGSLOT_HAS_POSIX_THREADS
pthread_mutex_t* multi_threaded_global::get_mutex() {
static pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER;
return &g_mutex;
}
#endif // _SIGSLOT_HAS_POSIX_THREADS
} // namespace sigslot