jacklinquan / usbserial4a

Python package for Android USB host serial port.
MIT License
62 stars 17 forks source link

do you need a working thread to read? #4

Closed jjsch-dev closed 4 years ago

jjsch-dev commented 4 years ago

Hello, very good job, I am testing the library and I have problems when I want to read more than 20 characters. The reading is done in the main thread, in the example I saw that you use a working thread, is this necessary?

jacklinquan commented 4 years ago

Hello, very good job, I am testing the library and I have problems when I want to read more than 20 characters. The reading is done in the main thread, in the example I saw that you use a working thread, is this necessary?

Hi @jjsch-dev , In the example, the reading is put in another thread because it blocks the code. With applications that have UI, I'm afraid it is necessary. Otherwise UI will not respond when reading is in operation.

jjsch-dev commented 4 years ago

Hello, thanks for answering. The problem was in my implementation of the Json parser, not in your library.