这样允许您创建一个任意复杂的数据结构,并将它作为一个指针传送给需要在这个数据结构上进行操作的线程。
This allows you to create an arbitrarily complicated data structure for the thread to work on, and pass it in as a single pointer.
乍看起来,这段代码似乎能运行得很好,因为创建了一个新的线程来处理访问网络的操作。
At first, this seems to work fine, because it creates a new thread to handle the network operation.
线程的创建和管理只需要较小的操作系统开销和较少的系统资源。
Threads can be created and managed less operating system overhead and fewer system resources.
应用推荐