Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dlls/mysqlx/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if AMXX.mysql_path:
binary.compiler.linkflags += [
os.path.join(AMXX.mysql_path, 'lib', 'opt', 'mysqlclient.lib'),
os.path.join(AMXX.mysql_path, 'lib', 'opt', 'zlib.lib'),
'wsock32.lib'
'ws2_32.lib'
]

binary.sources = [
Expand Down
6 changes: 3 additions & 3 deletions dlls/mysqlx/msvc12/mysqlx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>wsock32.lib;..\..\..\..\mysql-5.0\lib\opt\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMT;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<AdditionalDependencies>ws2_32.lib;..\..\..\..\mysql-5.0\lib\opt\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)mysql2.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
Expand All @@ -88,7 +88,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>wsock32.lib;..\..\..\..\mysql-5.0\lib\opt\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;..\..\..\..\mysql-5.0\lib\opt\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
Expand Down
2 changes: 1 addition & 1 deletion dlls/mysqlx/mysql/MysqlHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <ISQLDriver.h>
#if defined WIN32 || defined _WIN32
#include <winsock.h>
#include <WinSock2.h>
#endif
typedef unsigned long ulong;
#include <mysql.h>
Expand Down
2 changes: 1 addition & 1 deletion dlls/mysqlx/thread/ThreadWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "BaseWorker.h"

#define DEFAULT_THINK_TIME_MS 200
#define DEFAULT_THINK_TIME_MS 25

class ThreadWorker : public BaseWorker, public IThread
{
Expand Down
8 changes: 6 additions & 2 deletions dlls/mysqlx/threading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void ShutdownThreading()
{
if (g_pWorker)
{
// Flush all the remaining job fast!
g_pWorker->SetMaxThreadsPerFrame(8192);
g_pWorker->Stop(true);
delete g_pWorker;
g_pWorker = NULL;
Expand Down Expand Up @@ -316,7 +318,7 @@ void OnPluginsLoaded()
g_QueueLock = g_Threader.MakeMutex();
}

g_pWorker = new ThreadWorker(&g_Threader, 250);
g_pWorker = new ThreadWorker(&g_Threader, DEFAULT_THINK_TIME_MS);
if (!g_pWorker->Start())
{
delete g_pWorker;
Expand All @@ -333,7 +335,7 @@ void StartFrame()
{
if (g_pWorker && (g_lasttime < gpGlobals->time))
{
g_lasttime = gpGlobals->time + 0.05f;
g_lasttime = gpGlobals->time + 0.025f;
g_QueueLock->Lock();
size_t remaining = g_ThreadQueue.size();
if (remaining)
Expand Down Expand Up @@ -364,6 +366,8 @@ void OnPluginsUnloading()
return;
}

// Flush all the remaining job fast!
g_pWorker->SetMaxThreadsPerFrame(8192);
g_pWorker->Stop(false);
delete g_pWorker;
g_pWorker = NULL;
Expand Down
2 changes: 1 addition & 1 deletion dlls/sqlite/thread/ThreadWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "BaseWorker.h"

#define DEFAULT_THINK_TIME_MS 500
#define DEFAULT_THINK_TIME_MS 25

class ThreadWorker : public BaseWorker, public IThread
{
Expand Down
8 changes: 6 additions & 2 deletions dlls/sqlite/threading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ void ShutdownThreading()
{
if (g_pWorker)
{
// Flush all the remaining job fast!
g_pWorker->SetMaxThreadsPerFrame(8192);
g_pWorker->Stop(true);
delete g_pWorker;
g_pWorker = NULL;
Expand Down Expand Up @@ -293,7 +295,7 @@ void OnPluginsLoaded()
g_QueueLock = g_Threader.MakeMutex();
}

g_pWorker = new ThreadWorker(&g_Threader, 250);
g_pWorker = new ThreadWorker(&g_Threader, DEFAULT_THINK_TIME_MS);
if (!g_pWorker->Start())
{
delete g_pWorker;
Expand All @@ -310,7 +312,7 @@ void StartFrame()
{
if (g_pWorker && (g_lasttime < gpGlobals->time))
{
g_lasttime = gpGlobals->time + 0.05f;
g_lasttime = gpGlobals->time + 0.025f;
g_QueueLock->Lock();
size_t remaining = g_ThreadQueue.size();
if (remaining)
Expand Down Expand Up @@ -341,6 +343,8 @@ void OnPluginsUnloading()
return;
}

// Flush all the remaining job fast!
g_pWorker->SetMaxThreadsPerFrame(8192);
g_pWorker->Stop(false);
delete g_pWorker;
g_pWorker = NULL;
Expand Down