Adds BSQL thread limit to configuration options

This commit is contained in:
Jordan Brown
2018-07-24 14:46:36 -04:00
parent 172fca2e3f
commit 32a2221302
3 changed files with 8 additions and 1 deletions
@@ -44,4 +44,8 @@
min_val = 0
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/number/bsql_thread_limit
config_entry_value = 50
min_val = 1
/datum/config_entry/flag/bsql_debug
+1 -1
View File
@@ -76,7 +76,7 @@ SUBSYSTEM_DEF(dbcore)
var/address = CONFIG_GET(string/address)
var/port = CONFIG_GET(number/port)
connection = new /datum/BSQL_Connection(BSQL_CONNECTION_TYPE_MARIADB, CONFIG_GET(number/async_query_timeout), CONFIG_GET(number/blocking_query_timeout))
connection = new /datum/BSQL_Connection(BSQL_CONNECTION_TYPE_MARIADB, CONFIG_GET(number/async_query_timeout), CONFIG_GET(number/blocking_query_timeout), CONFIG_GET(number/bsql_thread_limit))
var/error
if(QDELETED(connection))
connection = null
+3
View File
@@ -38,5 +38,8 @@ ASYNC_QUERY_TIMEOUT 10
## Must be less than or equal to ASYNC_QUERY_TIMEOUT
BLOCKING_QUERY_TIMEOUT 5
## The maximum number of additional threads BSQL is allowed to run at once
BSQL_THREAD_LIMIT 50
## Uncomment to enable verbose BSQL communication logs
#BSQL_DEBUG