这是常见的情景(大多数Python程序员不用线程),锁操作稍微拖慢了解释器。
This is a common situation (most Python programs do not use threads), and the lock operations slow the interpreter down a bit.
异步编程时不用开发串行的“线程”代码,你会觉得这有些不自然。
In asynchronous programming you're not developing serial "threads" of code, and thus it doesn't feel that natural.
只要硬件能够适当地安排线程,许多程序设计人员就可能永远不用真正地担心并行程序设计。
As long as the hardware is able to schedule threads appropriately, it's possible that many programmers will never really have to worry about parallel programming.
如果您发现您的应用程序需要线程池,那么请考虑使用ut il . concurrent中的某个executor类,例如PooledExecutor,而不用从头开始编写。
If you find yourself in need of a thread pool for your application, consider using one of the Executor classes from util.concurrent, such as PooledExecutor, rather than writing one from scratch.
除了NFS内核线程之外,可以设置本文中讨论的参数,然后就不用理会它们了。
With the exception of NFS kernel threads, you can set and then ignore the parameters discussed in this article.
这意味着您不用花费过多的时间研究多线程,从而可以集中精力处理您自己的代码。
This means you spend less time on boiler plate code for multi-threading and more time on your code.
支持异步处理后,Servlet的线程就不用像以前那样了——收到来自资源的响应之后才能继续处理请求。
With the asynchronous processing support, a servlet no longer has to wait for a response from a resource such as a database before its thread can continue processing.
另一方面,不用牺牲性能和可伸缩性,Node的请求就可以延长一段时间,因为Node是个完全异步、单线程、单进程的框架。
On the other hand, in Node requests can extend for long periods of time without sacrificing performance or scalability, as it's a fully asynchronous, single-threaded, single-process framework.
由于这个应用程序并没有定义其他的线程,所以并不用关心如何处理该异常。
Since this application has not defined another thread to cause the interrupt, it doesn't bother to catch InterruptedException.
由于这个应用程序并没有定义其他的线程,所以并不用关心如何处理该异常。
Since this application has not defined another thread to cause the interrupt, it doesn't bother to catch InterruptedException.
应用推荐