keesverruijt / BR24radar_pi

OpenCPN radar plugin for Navico Broadband Radars (BR24, 3G, 4G models) [HISTORIC]
17 stars 26 forks source link

Solution for #254 #259

Closed douwefokkema closed 7 years ago

douwefokkema commented 7 years ago

This solution is not complete. Better one follows.

keesverruijt commented 7 years ago

Douwe, the "improved solution for shutdown of the receive thread" does not belong in this issue and I think the solution you have taken is not the right one. You are being very impolite in closing other thread's sockets, whilst there is already a way of signalling the other socket. Also you burn CPU cycles without yielding the CPU in stopping, and you don't use volatile so that the compiler knows that the variable is going to be changed whilst it is looping. I will add a better solution to the proper issue.