How to access a Runnable object by Thread?

前端 未结 11 927
深忆病人
深忆病人 2020-12-08 10:21

Possible duplicate: need-help-returning-object-in-thread-run-method

Hello. I have a class implementing runnable and I have a List, storing Threads instantiated with

11条回答
  •  甜味超标
    2020-12-08 11:09

    If your thread has state information, forget Runnable and simply extend Thread, overriding the run method.

提交回复
热议问题