Browsing Chinese (Simplified) translation

520 of 2684 results
520.
In this case, Twisted provides the ability to run the blocking code in a separate thread rather than letting it block your application. The <code class="API">twisted.internet.threads.deferToThread</code> function will set up a thread to run your blocking function, return a Deferred and later fire that Deferred when the thread completes.
type: Content of: <html><body><p>
这种情况下,Twisted 提供了让阻塞代码运行在独立线程的能力,这样它就不会阻塞你的应用程序。<code class="API">twisted.internet.threads.deferToThread</code> 函数会启动一个线程来运行阻塞函数,返回一个 Deferred。当线程完成时会激活那个 Deferred 。
Translated and reviewed by Liu, Kun
Located in howto/gendefer.xhtml:216
520 of 2684 results

This translation is managed by Exoweb FOSS, assigned by Twisted.

You are not logged in. Please log in to work on translations.