- 论坛徽章:
- 15
|
本帖最后由 yulihua49 于 2015-04-08 16:28 编辑
yulihua49 发表于 2015-04-08 15:58 ![]()
看27行,如果有可能,就yield to epoll,线程跑掉,当条件具备,就resume回来继续。
如果逃跑失败,就转成 ...
- 5 FIRST:8 04/08 15:00'25 RecvNet:tid=7F50A46DB700,socket=21,yield bcount=0/68
- 5 FIRST:8 04/08 15:00'25 thread_work:tid=7F50A46DB700,fiber yield from TCB_no=8
- 5 midsc:15198 04/08 15:00'25 thread_work:7F50A46DB700 create fiber for TCB_no=18
- 2 midsc:15198 04/08 15:00'25 连接 127.0.0.1,TCB:17,timeout=360
- 4 midsc:15198 04/08 15:00'25 do_work: TCB_no=10,tid=7F50A460F700,PROTO_NUM=0 pkg_len=77,t_len=77,O_NODE=16777343,USEC=3637551625043920
- 3 FIRST:127.0.0.1:10 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=10,tid:7F50A460F700,USEC=3637551625044062
- 5 FIRST:127.0.0.1:10 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=19
- 5 FIRST:127.0.0.1:10 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=19
- 5 FIRST:127.0.0.1:10 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=23,yield bcount=0/68
- 5 FIRST:127.0.0.1:10 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=10
- 5 midsc:15198 04/08 15:00'25 thread_work:7F50A460F700 create fiber for TCB_no=19
- 2 midsc:15198 04/08 15:00'25 连接 127.0.0.1,TCB:19,timeout=360
- 2 midsc:15198 04/08 15:00'25 连接 127.0.0.1,TCB:20,timeout=360
- 2 midsc:15198 04/08 15:00'25 连接 127.0.0.1,TCB:18,timeout=360
- 4 midsc:15198 04/08 15:00'25 do_work: TCB_no=15,tid=7F50A46DB700,PROTO_NUM=0 pkg_len=77,t_len=77,O_NODE=16777343,USEC=3637551625049720
- 3 FIRST:127.0.0.1:15 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=15,tid:7F50A46DB700,USEC=3637551625049876
- 5 FIRST:127.0.0.1:15 04/08 15:00'25 get_SC_weight:tid=7F50A46DB700,DNODE[1} weight[0]=18
- 5 FIRST:127.0.0.1:15 04/08 15:00'25 get_SC_weight:tid=7F50A46DB700,DNODE[1} weight[1]=19
- 2 midsc:15198 04/08 15:00'25 连接 127.0.0.1,TCB:21,timeout=360
- 5 FIRST:7 04/08 15:00'25 do_work:call_back TCB_no=7,tid=7F50A460F700,USEC=3637551625050727
- 3 FIRST:7 04/08 15:00'25 from_client:TCB:7,tid=7F50A460F700,Send to serv proto_num=0X000A,t_cont=-2147483646,SendPack ret=0,USEC=3637551625050774
- 4 midsc:15198 04/08 15:00'25 do_work: TCB_no=13,tid=7F50A460F700,PROTO_NUM=0 pkg_len=77,t_len=77,O_NODE=16777343,USEC=3637551625050810
- 3 FIRST:127.0.0.1:13 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=13,tid:7F50A460F700,USEC=3637551625050935
- 5 FIRST:127.0.0.1:13 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=18
- 5 FIRST:127.0.0.1:13 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=18
- 5 FIRST:127.0.0.1:13 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=25,yield bcount=0/68
- 5 FIRST:127.0.0.1:13 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=13
- 5 midsc:15198 04/08 15:00'25 thread_work:7F50A460F700 create fiber for TCB_no=14
- 4 midsc:15198 04/08 15:00'25 do_work: TCB_no=14,tid=7F50A460F700,PROTO_NUM=0 pkg_len=77,t_len=77,O_NODE=16777343,USEC=3637551625052286
- 3 FIRST:127.0.0.1:14 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=14,tid:7F50A460F700,USEC=3637551625052427
- 5 FIRST:127.0.0.1:14 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=17
- 5 FIRST:127.0.0.1:14 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=18
- 5 FIRST:127.0.0.1:14 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=26,yield bcount=0/68
- 5 FIRST:127.0.0.1:14 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=14
- 5 FIRST:11 04/08 15:00'25 thread_work:7F50A460F700 create fiber for TCB_no=11
- 4 FIRST:11 04/08 15:00'25 do_work: TCB_no=11,tid=7F50A460F700,PROTO_NUM=0 pkg_len=0,t_len=0,O_NODE=4187505156,USEC=3637551625053288
- 3 FIRST:11 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=11,tid:7F50A460F700,USEC=3637551625053304
- 5 FIRST:11 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=17
- 5 FIRST:11 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=17
- 5 FIRST:127.0.0.1:15 04/08 15:00'25 RecvNet:tid=7F50A46DB700,socket=24,yield bcount=0/68
- 5 FIRST:127.0.0.1:15 04/08 15:00'25 thread_work:tid=7F50A46DB700,fiber yield from TCB_no=15
- 5 midsc:15198 04/08 15:00'25 thread_work:7F50A46DB700 create fiber for TCB_no=22
- 5 FIRST:11 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=27,yield bcount=0/68
- 5 FIRST:11 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=11
- 5 midsc:15198 04/08 15:00'25 thread_work:7F50A460F700 create fiber for TCB_no=16
- 4 midsc:15198 04/08 15:00'25 do_work: TCB_no=16,tid=7F50A460F700,PROTO_NUM=0 pkg_len=77,t_len=77,O_NODE=16777343,USEC=3637551625054158
- 3 FIRST:127.0.0.1:16 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=16,tid:7F50A460F700,USEC=3637551625054285
- 5 FIRST:127.0.0.1:16 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=16
- 5 FIRST:127.0.0.1:16 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=17
- 5 FIRST:127.0.0.1:16 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=28,yield bcount=0/68
- 5 FIRST:127.0.0.1:16 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=16
- 5 midsc:15198 04/08 15:00'25 thread_work:7F50A460F700 create fiber for TCB_no=9
- 4 midsc:15198 04/08 15:00'25 do_work: TCB_no=9,tid=7F50A460F700,PROTO_NUM=0 pkg_len=77,t_len=77,O_NODE=16777343,USEC=3637551625055294
- 3 FIRST:127.0.0.1:9 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=9,tid:7F50A460F700,USEC=3637551625055422
- 5 FIRST:127.0.0.1:9 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=16
- 5 FIRST:127.0.0.1:9 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=16
- 5 FIRST:127.0.0.1:9 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=29,yield bcount=0/68
- 5 FIRST:127.0.0.1:9 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=9
- 5 FIRST:12 04/08 15:00'25 thread_work:7F50A460F700 create fiber for TCB_no=12
- 4 FIRST:12 04/08 15:00'25 do_work: TCB_no=12,tid=7F50A460F700,PROTO_NUM=0 pkg_len=0,t_len=0,O_NODE=2557866597,USEC=3637551625056254
- 3 FIRST:12 04/08 15:00'25 get_s_connect:get pool[0],TCB_no=12,tid:7F50A460F700,USEC=3637551625056270
- 5 FIRST:12 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[0]=15
- 5 FIRST:12 04/08 15:00'25 get_SC_weight:tid=7F50A460F700,DNODE[1} weight[1]=16
- 5 FIRST:12 04/08 15:00'25 RecvNet:tid=7F50A460F700,socket=30,yield bcount=0/68
- 5 FIRST:12 04/08 15:00'25 thread_work:tid=7F50A460F700,fiber yield from TCB_no=12
- 5 FIRST:8 04/08 15:00'25 thread_work:tid=7F50A460F700,resume to TCB_no=8
复制代码 第二行:tid=7F50A46DB700,fiber yield from TCB_no=8;线程DB700从TCB_no=8 逃出。
下一行它就为TCB_no=18服务了。
66行,TCB_no=8终于resume了,但是线程变为7F50A460F700了。
中间,一群线程抢一堆任务,好乱呀。
|
|