ecode: More XML Tools plugin fixes.

This commit is contained in:
Martín Lucas Golini
2023-07-11 17:49:01 -03:00
parent c2e8a55bfa
commit f9ead38c9c
7 changed files with 81 additions and 59 deletions

View File

@@ -18,6 +18,12 @@ using json = nlohmann::json;
namespace ecode {
#if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN || defined( __EMSCRIPTEN_PTHREADS__ )
#define LSPCLIENT_THREADED 1
#else
#define LSPCLIENT_THREADED 0
#endif
class LSPLocationModel : public Model {
public:
enum CustomInfo { URI, TextRange };
@@ -122,7 +128,11 @@ LSPClientPlugin::LSPClientPlugin( PluginManager* pluginManager, bool sync ) :
if ( sync ) {
load( pluginManager );
} else {
#if defined( LSPCLIENT_THREADED ) && LSPCLIENT_THREADED == 1
mThreadPool->run( [&, pluginManager] { load( pluginManager ); } );
#else
load( pluginManager );
#endif
}
}