Skip to content

Commit 3f28ea0

Browse files
committed
Hard wrap the paragraphs
1 parent a0d36e9 commit 3f28ea0

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/advanced.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,24 @@ This document covers some of AutoHotkey.py's more advanced features.
1010
Threading
1111
---------
1212

13-
In Python, the :mod:`threading` module can improve the responsiveness
14-
of applications that accept user input while other tasks are running in the
13+
In Python, the :mod:`threading` module can improve the responsiveness of
14+
applications that accept user input while other tasks are running in the
1515
background. A related use case is running I/O in parallel with computations in
1616
another thread. These are actual OS threads, as opposed to AHK `pseudo-threads
1717
<https://www.autohotkey.com/docs/misc/Threads.htm>`_.
1818

1919
AutoHotkey.py calls AHK functions from python by registering a callback in AHK
2020
with `RegisterCallback
2121
<https://www.autohotkey.com/docs/commands/RegisterCallback.htm>`_. *These
22-
callbacks are not thread-safe.* That is, while the *main thread* is busy executing
23-
an AHK function, calling another AHK
24-
function from *another thread* yields unpredictable results. It may even crash
25-
the program.
22+
callbacks are not thread-safe.* That is, while the *main thread* is busy
23+
executing an AHK function, calling another AHK function from *another thread*
24+
yields unpredictable results. It may even crash the program.
2625

2726
Thus, the *global AutoHotkey lock* (GAL) was introduced. GAL ensures that only
2827
one OS thread interacts with AHK at a time.
2928

30-
For background threads to work, the main thread must also be crunching
31-
Python code, for example, actively waiting for the background threads to finish.
29+
For background threads to work, the main thread must also be crunching Python
30+
code, for example, actively waiting for the background threads to finish.
3231
However, calling :meth:`threading.Thread.join` in the main thread blocks AHK
3332
message queue handling. In such cases, AHK cannot handle hotkeys and other
3433
callbacks.
@@ -47,8 +46,8 @@ asyncio
4746
-------
4847

4948
AutoHotkey.py works well with :mod:`asyncio`. When starting a long-running loop,
50-
schedule the :func:`ahkpy.sleep` call repeatedly. This gives AHK time to
51-
process its message queue::
49+
schedule the :func:`ahkpy.sleep` call repeatedly. This gives AHK time to process
50+
its message queue::
5251

5352
import asyncio
5453

0 commit comments

Comments
 (0)