目前分類:C and C++ (177)

瀏覽方式: 標題列表 簡短摘要
#include "mpmc.hpp"
#include "lightsem.hpp"

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
#include <ios>

hedgezzz 發表在 痞客邦 留言(0) 人氣()


// ======== Begin Code ========

hedgezzz 發表在 痞客邦 留言(0) 人氣()

  • May 07 Thu 2015 15:19
  • chrono

#include  <chrono>

using std::cout;

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
#include <type_traits>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:無智亦無得,以無所得故
  • 請輸入密碼:
  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:能除一切苦,真實不虛
  • 請輸入密碼:

http://www.soa-world.de/echelon/2011/02/a-simple-lock-free-queue-in-c.html

 

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include <cstdatomic>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

struct datafeed
{

hedgezzz 發表在 痞客邦 留言(0) 人氣()

int main ()
{

hedgezzz 發表在 痞客邦 留言(0) 人氣()

UpdateTime: 16:28 2015/1/30

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include "mpmc.hpp"

hedgezzz 發表在 痞客邦 留言(0) 人氣()

https://github.com/ncrookston/cpp-training/wiki/Values,-References-and-Pointers

 

hedgezzz 發表在 痞客邦 留言(0) 人氣()

http://kukuruku.co/hub/cpp/lightweight-http-server-in-less-than-40-lines-on-libevent-and-c-11

 

hedgezzz 發表在 痞客邦 留言(0) 人氣()

http://marknelson.us/2002/03/01/next-permutation/

http://marknelson.us/2011/09/03/hash-functions-for-c-unordered-containers/

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include <iostream>
#include <vector>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

上篇的例子 ,  如果使用 thread pool 而不是 每個 client 一個 threads ?!

這樣做的話 , 每個 client 只要一個結構去管理 ,  thread pool 固定去看 shared memory 以及

hedgezzz 發表在 痞客邦 留言(0) 人氣()

1.  像資料庫一樣,使用一個 port listen , 當接收到  連線時 , 立刻使用 pass fd through unix domain

將 fd 轉到其他 process  ,  例如 50支程式 , 每支 500 threads , 可以服務兩萬五千個 clients ,

hedgezzz 發表在 痞客邦 留言(0) 人氣()

template <class _A, class _B, class _Compare=less<_A> >
class MMap : public set < pair< _A, _B >, _Compare >

hedgezzz 發表在 痞客邦 留言(0) 人氣()