-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Right now, we aren't waiting on any of our threads that load music into the library. These include:
- The MusicLibraryLoaderThread, which loads the phone's local music when the app is booted
- The RequestLibraryThread, which requests and loads the music metadata and album art from a remote phone.
We need to make sure of several things:
- When creating a Jam, don't exchange library data with any joining clients until all local music has been loaded from the MusicLibraryLoaderThread.
- When joining a Jam, don't exchange library data with the Master phone until all local music has been loaded.
- When accepting multiple clients in quick succession, the Master phone should exchange music data with the clients in a serialized fashion. (This may not actually be a problem, as we're POSTing each remote library to all clients after loading completely.)
I talked with @JayThomason and we decided these things can probably be easily solved with an exclusive loaderLock that wraps around the relevant code blocks.