diff options
author | Chris Liechti <cliechti@gmx.net> | 2016-05-18 22:03:29 +0200 |
---|---|---|
committer | Chris Liechti <cliechti@gmx.net> | 2016-05-18 22:03:29 +0200 |
commit | 9d893054aae0229aea504337c34ff9c7138953d9 (patch) | |
tree | 7653843c3650f2433abcfb6e70dec67b2102ca2e | |
parent | 9cbd646cd5434528ea88071be1957415a1b722c6 (diff) | |
download | pyserial-git-9d893054aae0229aea504337c34ff9c7138953d9.tar.gz |
doc: update/extend cancel_read/write, mention new Posix support
-rw-r--r-- | documentation/pyserial_api.rst | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/documentation/pyserial_api.rst b/documentation/pyserial_api.rst index e0101d1..b038f91 100644 --- a/documentation/pyserial_api.rst +++ b/documentation/pyserial_api.rst @@ -523,17 +523,29 @@ Native ports .. method:: cancel_read() + :platform: Posix :platform: Windows - Cancel a pending read operation from an other thread. + Cancel a pending read operation from an other thread. A blocking + :meth:`read` call is aborted immediately. :meth:`read` will not report + any error but return all data received up to that point (similar to a + timeout). + + On Posix a call to `cancel_read()` may cancel a future :meth:`read` call. .. versionadded:: 3.1 .. method:: cancel_write() + :platform: Posix :platform: Windows - Cancel a pending write operation from an other thread. + Cancel a pending write operation from an other thread. The + :meth:`write` method will return immediately (no error indicated). + However the OS may still be sending from the buffer, a separate call to + :meth:`reset_output_buffer` may be needed. + + On Posix a call to `cancel_write()` may cancel a future :meth:`write` call. .. versionadded:: 3.1 |