首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

多线程课程001:线程安全的有关问题

2012-12-28 
多线程课程001:线程安全的问题下面的做法,会发现输出结果被打断了。main应该执行完10次才到sub的,可是被打

多线程课程001:线程安全的问题
下面的做法,会发现输出结果被打断了。


main应该执行完10次才到sub的,可是被打断了







main thread sequence of 98,loop of 32main thread sequence of 99,loop of 32main thread sequence of 100,loop of 32sub thread sequence of 1,loop of 33sub thread sequence of 2,loop of 33sub thread sequence of 3,loop of 33sub thread sequence of 4,loop of 33sub thread sequence of 5,loop of 33sub thread sequence of 6,loop of 33sub thread sequence of 7,loop of 33sub thread sequence of 8,loop of 33sub thread sequence of 9,loop of 33sub thread sequence of 10,loop of 33main thread sequence of 1,loop of 33main thread sequence of 2,loop of 33

热点排行