TC官方合作论坛

标题: 线程关闭问题 [打印本页]

作者: B哥    时间: 2012-12-16 21:23
标题: 线程关闭问题
就一个关闭子线程操作,为什么一关闭子线程,TC程序直接关闭了????
  1. namespace CloseThreadTest
  2. int runChartThreadhandle //子线程句陃

  3. function bool start_click()
  4.     runChartThreadhandle = thread.beginthreadex("CloseThreadTest.runChart","","CloseThreadTest.cancellationRunChart","")
  5.     help.sleep(10000)
  6.     //-------------------- 关闭runChartThreadhandle线程,就到整个程序关了?什么报也不报,这是啥意思罗!!!!
  7.     thread.closethread(runChartThreadhandle)
  8. return true
  9. endfunction

  10. //子线程
  11. function bool runChart(string str)
  12.     help.messagebox("跑图线程被开始了!!!!!!!!!!!!!!!!")
  13.     while(true)         
  14.         help.sleep(3000)
  15.         help.messagebox("角色在跑图中...")
  16.     endwhile  
  17.     return true
  18. endfunction

  19. //结束子线程执行
  20. function bool  cancellationRunChart(string str)
  21.     help.messagebox("跑图线程被关闭")
  22.     return true
  23. endfunction

  24. function bool exit_click()
  25. help.exit()
  26. return true
  27. endfunction
  28. endnamespace
复制代码
----------郁闷坐等好心人!!!!

作者: 我是冰冻的番茄    时间: 2012-12-16 22:03
B 哥 你好,B哥再见,
作者: B哥    时间: 2012-12-16 23:44
结贴:神奇的: CloseThreadTest  神奇的TC!




欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/) Powered by Discuz! X3.1