1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-08 07:09:52 +00:00

Add a thread pool for background job processing, and use it for OggDecoder.

The pool adjusts to the amount of required threads.
The implementation is as simple as possible, but should be enough
for future extensions.

This brings down decoder thread creation/destruction even more.

Also fix OpenALSystem::release() to close channels properly on shutdown,
otherwise it would deadlock with the pool, because it waits until all
threads have died off, which did not necessarily happen.
This commit is contained in:
fgenesis 2012-02-09 16:08:35 +01:00
parent 9e675be651
commit 010f44d264
5 changed files with 460 additions and 8 deletions

View file

@ -42,6 +42,8 @@ BUILD_LINUX
#include "DarkLayer.h"
#include "MT.h"
/*
#ifdef BBGE_BUILD_WINDOWS
#include "Joystick.h"
@ -1313,6 +1315,8 @@ public:
int tgaSave(const char *filename, short int width, short int height, unsigned char pixelDepth, unsigned char *imageData);
ThreadPool threadpool;
protected:
std::string fpsDebugString;