Skip to content

Commit

Permalink
docs: render deferToThread example as code
Browse files Browse the repository at this point in the history
Prior to this change, the documentation was not rendering this example
as a code block. The documentation simply displayed indented text here.

Add a double-colon to signify that this is code.
  • Loading branch information
ktdreyer committed Mar 24, 2018
1 parent 89e7117 commit 95ac848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/core/howto/threading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ When we run some code, we often want to know what its result was. For this, Twi

To get a result from some blocking code back into the reactor thread, we can use :api:`twisted.internet.threads.deferToThread <deferToThread>` to execute it instead of callFromThread.

::

from __future__ import print_function
from twisted.internet import reactor, threads

Expand Down
Empty file.

0 comments on commit 95ac848

Please sign in to comment.