|
|
static constexpr const char * | Name = "threads" |
|
static constexpr const char * | Description = "The number of total threads used by the system." |
|
static constexpr const char * | InputType = "BIGINT" |
◆ SetGlobal()
302969 {
302970 auto new_val = input.GetValue<
int64_t>();
302971 if (new_val < 1) {
302972 throw SyntaxException("Must have at least 1 thread!");
302973 }
302974 auto new_maximum_threads = NumericCast<idx_t>(new_val);
302975 if (db) {
302976 TaskScheduler::GetScheduler(*db).SetThreads(new_maximum_threads, Settings::Get<ExternalThreadsSetting>(config));
302977 }
302979}
idx_t maximum_threads
The maximum amount of CPU threads used by the database system. Default: all available.
Definition duckdb.hpp:40004
DBConfigOptions options
Database configuration options.
Definition duckdb.hpp:40090
◆ ResetGlobal()
302981 {
302982 idx_t new_maximum_threads = config.GetSystemMaxThreads(*config.
file_system);
302983 if (db) {
302984 TaskScheduler::GetScheduler(*db).SetThreads(new_maximum_threads, Settings::Get<ExternalThreadsSetting>(config));
302985 }
302987}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
unique_ptr< FileSystem > file_system
The FileSystem to use, can be overwritten to allow for injecting custom file systems for testing purp...
Definition duckdb.hpp:40082
◆ GetSetting()
302989 {
302990 auto &config = DBConfig::GetConfig(context);
302991 return Value::BIGINT(NumericCast<int64_t>(config.options.maximum_threads));
302992}
static DUCKDB_API Value BIGINT(int64_t value)
Create a bigint Value from a specified value.
Definition duckdb.cpp:132146
The documentation for this struct was generated from the following file: