From 29dda9f356042c403b3b7da1d717d32b45c9b6de Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 29 Jun 2015 11:06:03 +0200 Subject: Add UpdateThread and use it for minimap and mesh threads --- src/minimap.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/minimap.h') diff --git a/src/minimap.h b/src/minimap.h index 37bc2f7cb..3cb7da898 100644 --- a/src/minimap.h +++ b/src/minimap.h @@ -96,7 +96,6 @@ public: bool addBlock(v3s16 pos, MinimapMapblock *data); - // blocking!! QueuedMinimapUpdate *pop(); u32 size() @@ -110,12 +109,16 @@ private: JMutex m_mutex; }; -class MinimapUpdateThread : public JThread +class MinimapUpdateThread : public UpdateThread { private: - JSemaphore m_queue_sem; MinimapUpdateQueue m_queue; +protected: + const char *getName() + { return "MinimapUpdateThread"; } + virtual void doUpdate(); + public: MinimapUpdateThread(IrrlichtDevice *device, Client *client) { @@ -131,13 +134,10 @@ public: video::SColor getColorFromId(u16 id); void enqueue_Block(v3s16 pos, MinimapMapblock *data); - void forceUpdate(); IrrlichtDevice *device; Client *client; video::IVideoDriver *driver; ITextureSource *tsrc; - void Stop(); - void *Thread(); MinimapData *data; std::map m_blocks_cache; }; -- cgit v1.2.3