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:
parent
9e675be651
commit
010f44d264
5 changed files with 460 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue