Good morning.
about refPositionSampleMap I think I’m in a classic producer-consumer problem.
I’ve component A receiving position events cause it subscribes le_gnss_AddPositionHandler.
On other isde I’ve componet B that is responsible to send this postions over the network.
Naturally B is slower than A (low network, connection lost orto recover etc.).
So… in case B is not fast enough to dequeue refPositionSampleMap seems to grow too much.
I’ve no control on items in refPositionSampleMap, cause it belongs to platform service, so i cant refuse new additions.
in component A, inside PositionReceivedHandler(), you don’t need to directly call component B to send data.
You can use some global variable to save it.
In this case, you can immediately do le_gnss_ReleaseSampleRef().
You can then create another thread or timer to read these global variable and ask component B to send to network.
Hello,
I’ve tried with tread as first solution but the app stops working with message “call to Component B on a different Thread”. I used a Timer with a local variable and it worked.
Thanks.