Hi, I’m seeing the following warnings when running Bluetooth discovery on Windows:
The 'flutter_classic_bluetooth/discovery_results' channel sent a message from native to Flutter on a non-platform thread.
The 'flutter_classic_bluetooth/discovery_state' channel sent a message from native to Flutter on a non-platform thread.
Discovery still appears to work, but Flutter notes that this may result in lost messages or crashes.
Looking at the Windows implementation, HandleStartDiscovery runs discovery in a background std::thread. The discovery result events and final discovery state event appear to be sent directly from that thread.
Environment
- flutter_classic_bluetooth: 0.1.5
- Flutter: 3.44.1
- Platform: Windows
Steps to reproduce
- Listen to the discovery state and results streams.
- Start Bluetooth discovery.
- Observe the warnings in the application output.
Flutter threading documentation:
https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading
Hi, I’m seeing the following warnings when running Bluetooth discovery on Windows:
Discovery still appears to work, but Flutter notes that this may result in lost messages or crashes.
Looking at the Windows implementation, HandleStartDiscovery runs discovery in a background std::thread. The discovery result events and final discovery state event appear to be sent directly from that thread.
Environment
Steps to reproduce
Flutter threading documentation:
https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading