學習concurrency programming進展

看了一段時間的actor model,goroutine之類的東東,最近在github上寫了個簡單的框架,git

注:未作大量測試,僅供學習用,勿用於生產用途github

 

連接: https://github.com/hejinshou/SimpleActorModel多線程

裏面有幾個例子框架

  • example_actor_singlethread.cpp 單線程actor框架
  • example_actor_thread.cpp 每一個actor一個線程
  • example_lift.cpp 電梯調度程序,使用每一個actor一個線程
  • example_actor_coroutine.cpp 使用coroutine作單線程調度的actor框架
  • example_actor_coroutine_ring.cpp 環形隊列測試
  • actor_threadpool.cpp 基於線程池的actor框架
  • example_actor_coroutine_yield.cpp yield測試
  • example_lift.cpp 電梯調度例子(注:未作詳細測試)
  • example_task.cpp 利用actor model實現的task框架
  • testLibTask-channel.cpp task框架channel測試,該框架支持coroutine+基於work sharing的多線程調度
  • testLibTask-channel2.cpp task框架channel測試
  • testLibTask-skynet.cpp boost::fiber裏的skynet測試
  • testLibTask-sleep.cpp sleep測試
相關文章
相關標籤/搜索