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/client.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 474daf3bc..efd373e42 100644 --- a/src/client.h +++ b/src/client.h @@ -113,23 +113,27 @@ struct MeshUpdateResult } }; -class MeshUpdateThread : public JThread +class MeshUpdateThread : public UpdateThread { +private: + MeshUpdateQueue m_queue_in; + +protected: + const char *getName() + { return "MeshUpdateThread"; } + virtual void doUpdate(); + public: - MeshUpdateThread(IGameDef *gamedef): - m_gamedef(gamedef) + MeshUpdateThread() { } - void * Thread(); - - MeshUpdateQueue m_queue_in; + void enqueueUpdate(v3s16 p, MeshMakeData *data, + bool ack_block_to_server, bool urgent); MutexedQueue m_queue_out; - IGameDef *m_gamedef; - v3s16 m_camera_offset; }; -- cgit v1.2.3