还是别人的笔记比较详细:

https://segmentfault.com/blog/ressmix_multithread?page=3

mark。