Submit Search
Upload
D1024241027
•
Download as PPTX, PDF
•
1 like
•
116 views
玲
玲 謝
Follow
執行緒
Read less
Read more
Internet
Slideshow view
Report
Share
Slideshow view
Report
Share
1 of 9
Download now
Recommended
D1024241027
D1024241027
玲 謝
作業系統作業莊英基
作業系統作業莊英基
英基 莊
D102424126陳萱
D102424126陳萱
萱 陳
作業系統 執行緒
作業系統 執行緒
Yu Chi Chou
Salazar Autobiography Presentation
Salazar Autobiography Presentation
bentonmiddle
Joy Shin Autobiography
Joy Shin Autobiography
bentonmiddle
Salazar Presentation Autobiography
Salazar Presentation Autobiography
bentonmiddle
Wilson atuobiography
Wilson atuobiography
bentonmiddle
Recommended
D1024241027
D1024241027
玲 謝
作業系統作業莊英基
作業系統作業莊英基
英基 莊
D102424126陳萱
D102424126陳萱
萱 陳
作業系統 執行緒
作業系統 執行緒
Yu Chi Chou
Salazar Autobiography Presentation
Salazar Autobiography Presentation
bentonmiddle
Joy Shin Autobiography
Joy Shin Autobiography
bentonmiddle
Salazar Presentation Autobiography
Salazar Presentation Autobiography
bentonmiddle
Wilson atuobiography
Wilson atuobiography
bentonmiddle
Presentacion Informatica3
Presentacion Informatica3
oswaldo70
Hansele Autobiography powerpoint
Hansele Autobiography powerpoint
bentonmiddle
My autobiography
My autobiography
Karenn Moldez
An Example Of An Autobiography
An Example Of An Autobiography
Jomar Villote
How to stand out online
How to stand out online
Mars Dorian
Your Speech is Toxic
Your Speech is Toxic
Chiara Ojeda
Great Speakers Tell Stories
Great Speakers Tell Stories
Slides That Rock
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
Empowered Presentations
More Related Content
Viewers also liked
Presentacion Informatica3
Presentacion Informatica3
oswaldo70
Hansele Autobiography powerpoint
Hansele Autobiography powerpoint
bentonmiddle
My autobiography
My autobiography
Karenn Moldez
An Example Of An Autobiography
An Example Of An Autobiography
Jomar Villote
How to stand out online
How to stand out online
Mars Dorian
Your Speech is Toxic
Your Speech is Toxic
Chiara Ojeda
Great Speakers Tell Stories
Great Speakers Tell Stories
Slides That Rock
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
Empowered Presentations
Viewers also liked
(8)
Presentacion Informatica3
Presentacion Informatica3
Hansele Autobiography powerpoint
Hansele Autobiography powerpoint
My autobiography
My autobiography
An Example Of An Autobiography
An Example Of An Autobiography
How to stand out online
How to stand out online
Your Speech is Toxic
Your Speech is Toxic
Great Speakers Tell Stories
Great Speakers Tell Stories
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
SMOKE - The Convenient Truth [1st place Worlds Best Presentation Contest] by ...
D1024241027
1.
作業系統作業 執行緒 資三A D1024241027 謝宜玲
2.
第一個畫面 1.Thread() – ThreadExample1
3.
執行結果
4.
5.
Constrctor沒有參數,Thread()產生的Thread,進入點是run()。 那麼,當run()結束的時候,這個執行緒也就結束了,和mian()結束 有相同的效果。 第4行,表示覆蓋了執行緒的運行。 第5行,表示要印出的執行緒的起點。 第6行,表示無限循環印出的訊息。 第7行,表示要印出User Created Thread。 第11行,表示產生Thread物件。 第12行,表示要開始執行
t.run()。 第13行,表示無限循環印出的訊息。 第14行,表示要印出Main Thread D1024241027謝宜玲。 執行以上的程式之後,螢幕上會持續的印出User Created Thread 或 Main Thread D1024241027謝宜玲的結果。 解釋
6.
第二個畫面 2.Thread(Runnable) – ThreadExample2
7.
執行結果
8.
9.
我們需要一個Runnable物件來當參數,Thread(Runnable)產生的 Thread,進入點是Runnable物件裡的run()。 當run()結束的時候,這個執行緒也就結束了,與main()結束有相同 的效果。 第4行,表示執行Runnable的運行。 第5行,表示要印出的執行緒的起點。 第6行,表示無限循環印出的訊息。 第7行,表示要印出User Created Thread。 第11行,表示產生Thread物件。 第12行,表示要開始執行
Runnable.run()。 第13行,表示無限循環印出的訊息。 第14行,表示要印出Main Thread D1024241027謝宜玲。 執行以上的程式之後,螢幕上會持續印出User Created Thread 或 Main Thread D1024241027謝宜玲的結果。 解釋
Download now