add note to unix_timeout

This commit is contained in:
Prodesire 2017-11-03 22:31:03 +08:00
parent 65d17c20a3
commit 5bce992c4e
1 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@ Miscellanea
.. function:: pydu.unix_timeout(seconds) .. function:: pydu.unix_timeout(seconds)
This func decorates any func which may be hang for a while. The param ``seconds`` This func decorates any func which may be hang for a while. The param ``seconds``
should be integer. ``unix_timeout`` can only be used on ``unix-like`` system. should be integer.
In `test.py`, you may write like below: In `test.py`, you may write like below:
.. code-block:: python .. code-block:: python
@ -18,6 +18,8 @@ Miscellanea
And run `test.py`, will see ``TimeoutError``. And run `test.py`, will see ``TimeoutError``.
.. note:: ``unix_timeout`` can only be used on ``unix-like`` system.
.. function:: pydu.trace(obj) .. function:: pydu.trace(obj)