-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture: Threading
localghost edited this page Jun 5, 2014
·
45 revisions
Information related to tasks can be found here.
There will probably be a couple of threads that would be accessed by different classes, e.g. thread through which all the libspotify API calls should be made.
- spotify_thread : all the libspotify API calls should be done through this thread
Possible solutions for adding tasks to a not running thread:
- Add a task so that it is executed whenever the thread is started
- Change the function's signature to return bool(false) and do not add task to the queue
- Assert when thread is not running (current approach)
- Throw exception if thread is not running