diff options
Diffstat (limited to 'documentation/pyserial_api.rst')
-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 |