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
Recently MacOS SDK deprecated use of shared_ptr::unique (see #11318 ). A workaround is to use shared_ptr::use_count() ==1 , which is what was used underneath by unique(). The problem is that use_count() is unreliable and not meant to be used when the shared_ptr is used across threads , see : https://stackoverflow.com/q/77286007
A lot of places use use_count() == 1 to decide if its safe to mutate said shared_ptr and all of these use cases assume that the Vector is not shared across multiple threads or is synchronized by some other means.
System information
N/a
Relevant logs
No response
The text was updated successfully, but these errors were encountered:
We assume each thread using vector should keep a copy of shared_ptr. With this assumption hold the current usages are safe.
We should not expect client code to hold this assumption though, so external code outside Velox should be advised to use a mutex to synchronize the multi-threaded usage of vectors.
Bug description
Recently MacOS SDK deprecated use of shared_ptr::unique (see #11318 ). A workaround is to use shared_ptr::use_count() ==1 , which is what was used underneath by unique(). The problem is that use_count() is unreliable and not meant to be used when the shared_ptr is used across threads , see : https://stackoverflow.com/q/77286007
A lot of places use use_count() == 1 to decide if its safe to mutate said shared_ptr and all of these use cases assume that the Vector is not shared across multiple threads or is synchronized by some other means.
System information
N/a
Relevant logs
No response
The text was updated successfully, but these errors were encountered: