亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 4346 | 回復(fù): 1
打印 上一主題 下一主題

Thread Lifecycle [復(fù)制鏈接]

論壇徽章:
30
水瓶座
日期:2014-08-22 21:06:3415-16賽季CBA聯(lián)賽之新疆
日期:2015-12-19 19:05:48IT運維版塊每日發(fā)帖之星
日期:2015-12-25 06:20:31IT運維版塊每日發(fā)帖之星
日期:2015-12-25 06:20:31IT運維版塊每日發(fā)帖之星
日期:2015-12-25 06:20:3315-16賽季CBA聯(lián)賽之上海
日期:2016-04-15 19:51:31程序設(shè)計版塊每日發(fā)帖之星
日期:2016-04-17 06:23:29程序設(shè)計版塊每日發(fā)帖之星
日期:2016-04-23 06:20:00程序設(shè)計版塊每日發(fā)帖之星
日期:2016-05-26 06:20:00每日論壇發(fā)貼之星
日期:2016-05-26 06:20:0015-16賽季CBA聯(lián)賽之遼寧
日期:2017-02-16 23:59:4715-16賽季CBA聯(lián)賽之天津
日期:2019-01-11 01:11:44
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2009-09-28 17:48 |只看該作者 |倒序瀏覽
Thread Lifecycle:A new threads are created with Thread.new. You can also use the synonyms Thread.start and Thread.fork.
There is no need to start a thread after creating it, it begins running automatically when CPU resources become available.
The Thread class defines a number of methods to query and manipulatethe thread while it is running. A thread runs the code in the blockassociated with the call to Thread.new and then it stops running.
The value of the last expression in that block is the value of the thread, and can be obtained by calling the valuemethod of the Thread object. If the thread has run to completion, thenthe value returns the thread's value right away. Otherwise, the value method blocks and does not return until the thread has completed.
The class method Thread.current returns the Thread object that represents the current thread. This allows threads to manipulate themselves. The class method Thread.mainreturns the Thread object that represents the main thread.this is theinitial thread of execution that began when the Ruby program wasstarted.
You can wait for a particular thread to finish by calling that thread's Thread.join method. The calling thread will block until the given thread is finished.
Threads and Exceptions:If an exception is raised in the main thread, and is not handledanywhere, the Ruby interpreter prints a message and exits. In threadsother than the main thread, unhandled exceptions cause the thread tostop running.
If a thread t exits because of an unhandled exception, and another thread s calls t.join or t.value, then the exception that occurred in t is raised in the thread s.
If Thread.abort_on_exception is false, the default condition, an unhandled exception simply kills the current thread and all the rest continue to run.
If you would like any unhandled exception in any thread to cause the interpreter to exit, set the class method Thread.abort_on_exception to true.

論壇徽章:
0
2 [報告]
發(fā)表于 2010-01-29 16:19 |只看該作者
哇~~~媽呀,全是英文的~!
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP