Sometimes it is perfectly sensible to spawn a new thread for each new task.
有时,为每个新任务生成一个新线程是十分明智的。
While a thread is running, either uploading or downloading, you can query it to check on its status to provide the user with feedback (e.g. a progress bar).
当一个线程在运行的时候,不管是上传还是下载,你可以查询进程状态并且给用户一个反馈(例如一个进度条)。
A thread is created to handle each new user connection.
一个线程被创建来处理每个新用户连接。
应用推荐