You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In NimBLEScan::getDevice() here the device to return to the caller is assigned to a temporary variable. Is this unary? In other words, could the background scan update the device halfway copying the device? Or is this impossible? If possible, could / should it be protected by semaphore?
The text was updated successfully, but these errors were encountered:
Yes it seems possible that the data could be modified while copying, I don't think that method was meant to be used while scanning is active. The idea of those related methods seems to be that you would use the blocking scan call, then when complete, you would access the results via this.
In the scenario you describe, yes a semaphore would make sense to stay on the safe side.
Going to close this, as the scenario that may cause this issue is extremely unlikely.
Also, now that I've said it, I'm sure an issue involving this situation will be posted shortly 😆
In NimBLEScan::getDevice() here the device to return to the caller is assigned to a temporary variable. Is this unary? In other words, could the background scan update the device halfway copying the device? Or is this impossible? If possible, could / should it be protected by semaphore?
The text was updated successfully, but these errors were encountered: