面試題:Thread的start和run的區別

前言 這道題是併發編程關於線程Thread基礎的面試題,小夥伴們是不是感覺簡單?還是自己一下子蒙了呢?老顧今天來分享一下 先上代碼 t.run(); //調用run方法 //調用執行 current main thread is main task run..... task thread is : main 換成調用方法t.start(),執行 current main thread is m
相關文章
相關標籤/搜索