Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port.readBytesOnListen make UI hang/freeze a few millisecond when data come #11

Closed
indrawow opened this issue Apr 19, 2022 · 2 comments
Closed

Comments

@indrawow
Copy link

Using this code,
_port.readBytesOnListen(255, (Uint8List value) { debugPrint(value.toString()); });
then,
_port.writeBytesFromUint8List(uint8Data);

UI freeze a few millisecond, is there something i missed?

@FengChendian
Copy link
Owner

FengChendian commented Apr 21, 2022

I use a stream to read with duration. I think I should fix the UI freezed problem.

But _read is still a sync processing due to Windows 32API. Maybe you can use async or compute to solve this problem.

@FengChendian
Copy link
Owner

FengChendian commented Jun 10, 2022

Refer to PR #16 , maybe due to WaitForSingleObjec blocking.

If there is still problom about UI freeze, please tell me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants