RadiusNetworks / scanbeacon-gem

A Ruby gem for scanning beacons
MIT License
30 stars 9 forks source link

fixes a segfault due to a race condition when scanning on macOS #32

Closed syoder closed 7 years ago

syoder commented 7 years ago

The condition happened very intermittently if an advertisement was received at the same time the ruby code was checking if new advertisements had accrued in the array. The solution was to synchronize on the CoreBluetooth delegate, not the array itself because the array object would get re-alloc'd every time.