Using the pyserial flush method

I read somewhere that using a flash is necessary to reduce lag. It's true?

I am not sure about its use. Please help me understand exactly what he is doing.

I checked the pyserial docs, but it did not give me a lot of information. All he said was:

flush () Reset files like objects. Its no-op in this class can be overridden.

+3
source share
1 answer

The information you send / write can be temporarily stored in a buffer, so that a larger fragment can be written at a time. So if you do this:

f = open("test.txt","w")
f.write("Hello")

test.txt - , f.flush(), . f.close() .

, , , "-op" - , , , . , - .

+3

Source: https://habr.com/ru/post/1794694/


All Articles