Better name

This commit is contained in:
kssenii 2023-05-06 20:12:26 +02:00
parent 9bb681c104
commit 2228107134
3 changed files with 8 additions and 8 deletions

View File

@ -32,24 +32,24 @@ IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type)
{ {
case FilesystemReaderType::ASYNCHRONOUS_REMOTE_FS_READER: case FilesystemReaderType::ASYNCHRONOUS_REMOTE_FS_READER:
{ {
static auto asynchronous_remote_fs_reader = getThreadPoolReaderImpl(type, config); static auto asynchronous_remote_fs_reader = createThreadPoolReader(type, config);
return *asynchronous_remote_fs_reader; return *asynchronous_remote_fs_reader;
} }
case FilesystemReaderType::ASYNCHRONOUS_LOCAL_FS_READER: case FilesystemReaderType::ASYNCHRONOUS_LOCAL_FS_READER:
{ {
static auto asynchronous_local_fs_reader = getThreadPoolReaderImpl(type, config); static auto asynchronous_local_fs_reader = createThreadPoolReader(type, config);
return *asynchronous_local_fs_reader; return *asynchronous_local_fs_reader;
} }
case FilesystemReaderType::SYNCHRONOUS_LOCAL_FS_READER: case FilesystemReaderType::SYNCHRONOUS_LOCAL_FS_READER:
{ {
static auto synchronous_local_fs_reader = getThreadPoolReaderImpl(type, config); static auto synchronous_local_fs_reader = createThreadPoolReader(type, config);
return *synchronous_local_fs_reader; return *synchronous_local_fs_reader;
} }
} }
#endif #endif
} }
std::unique_ptr<IAsynchronousReader> getThreadPoolReaderImpl( std::unique_ptr<IAsynchronousReader> createThreadPoolReader(
FilesystemReaderType type, const Poco::Util::AbstractConfiguration & config) FilesystemReaderType type, const Poco::Util::AbstractConfiguration & config)
{ {
switch (type) switch (type)

View File

@ -16,7 +16,7 @@ enum class FilesystemReaderType
IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type); IAsynchronousReader & getThreadPoolReader(FilesystemReaderType type);
std::unique_ptr<IAsynchronousReader> getThreadPoolReaderImpl( std::unique_ptr<IAsynchronousReader> createThreadPoolReader(
FilesystemReaderType type, FilesystemReaderType type,
const Poco::Util::AbstractConfiguration & config); const Poco::Util::AbstractConfiguration & config);

View File

@ -4178,20 +4178,20 @@ IAsynchronousReader & Context::getThreadPoolReader(FilesystemReaderType type) co
case FilesystemReaderType::ASYNCHRONOUS_REMOTE_FS_READER: case FilesystemReaderType::ASYNCHRONOUS_REMOTE_FS_READER:
{ {
if (!shared->asynchronous_remote_fs_reader) if (!shared->asynchronous_remote_fs_reader)
shared->asynchronous_remote_fs_reader = getThreadPoolReaderImpl(type, getConfigRef()); shared->asynchronous_remote_fs_reader = createThreadPoolReader(type, getConfigRef());
return *shared->asynchronous_remote_fs_reader; return *shared->asynchronous_remote_fs_reader;
} }
case FilesystemReaderType::ASYNCHRONOUS_LOCAL_FS_READER: case FilesystemReaderType::ASYNCHRONOUS_LOCAL_FS_READER:
{ {
if (!shared->asynchronous_local_fs_reader) if (!shared->asynchronous_local_fs_reader)
shared->asynchronous_local_fs_reader = getThreadPoolReaderImpl(type, getConfigRef()); shared->asynchronous_local_fs_reader = createThreadPoolReader(type, getConfigRef());
return *shared->asynchronous_local_fs_reader; return *shared->asynchronous_local_fs_reader;
} }
case FilesystemReaderType::SYNCHRONOUS_LOCAL_FS_READER: case FilesystemReaderType::SYNCHRONOUS_LOCAL_FS_READER:
{ {
if (!shared->synchronous_local_fs_reader) if (!shared->synchronous_local_fs_reader)
shared->synchronous_local_fs_reader = getThreadPoolReaderImpl(type, getConfigRef()); shared->synchronous_local_fs_reader = createThreadPoolReader(type, getConfigRef());
return *shared->synchronous_local_fs_reader; return *shared->synchronous_local_fs_reader;
} }