#include "mpmc.hpp"
#include "lightsem.hpp"
#include "mpmc.hpp"
#include "lightsem.hpp"
#include <iostream>
#include <ios>
// ======== Begin Code ========
#include <iostream>
#include <type_traits>
#include <cstdatomic>
struct datafeed
{
int main ()
{
UpdateTime: 16:28 2015/1/30
#include "mpmc.hpp"
http://kukuruku.co/hub/cpp/lightweight-http-server-in-less-than-40-lines-on-libevent-and-c-11
http://marknelson.us/2002/03/01/next-permutation/
http://marknelson.us/2011/09/03/hash-functions-for-c-unordered-containers/
#include <iostream>
#include <vector>
上篇的例子 , 如果使用 thread pool 而不是 每個 client 一個 threads ?!
這樣做的話 , 每個 client 只要一個結構去管理 , thread pool 固定去看 shared memory 以及
1. 像資料庫一樣,使用一個 port listen , 當接收到 連線時 , 立刻使用 pass fd through unix domain
將 fd 轉到其他 process , 例如 50支程式 , 每支 500 threads , 可以服務兩萬五千個 clients ,
template <class _A, class _B, class _Compare=less<_A> >
class MMap : public set < pair< _A, _B >, _Compare >