Add a class to manage IO on a separate thread.

Also separate the logic for exiting the loop based on coreState.  IO and
audio won't necessarily be tied to the frame.
This commit is contained in:
Unknown W. Brackets committed 2013-08-11 11:46:55 -07:00
1 parent da1c59fa75
commit e6b42768fe
9 files changed
+189 -1

No files matched your search

+2 -1
View File
@@ -74,7 +74,7 @@ struct ThreadEventQueue : public B {
}
// Quit the loop if the queue is drained and coreState has tripped, or threading is disabled.
if (coreState != CORE_RUNNING || !threadEnabled_) {
if (ShouldExitEventLoop() || !threadEnabled_) {
return;
}
@@ -104,6 +104,7 @@ struct ThreadEventQueue : public B {
protected:
virtual void ProcessEvent(Event ev) = 0;
virtual bool ShouldExitEventLoop() = 0;
private:
bool threadEnabled_;