Skip to content

Commit

Permalink
#80 Replace TQueue to std::queue, TPriorityQueue to std::priority_que…
Browse files Browse the repository at this point in the history
…ue (#84)
  • Loading branch information
antonporodnikov authored Mar 8, 2024
1 parent 178e11a commit a6de641
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 298 deletions.
3 changes: 1 addition & 2 deletions client/ydb_persqueue_core/impl/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <client/ydb_persqueue_core/persqueue.h>
#include <client/ydb_common_client/impl/client.h>

#include <util/generic/queue.h>
#include <util/thread/pool.h>

#include <queue>
Expand Down Expand Up @@ -470,7 +469,7 @@ class TSerialExecutor : public IAsyncExecutor, public std::enable_shared_from_th
IAsyncExecutor::TPtr Executor; //!< Wrapped executor that is actually doing the job
bool Busy = false; //!< Set if some closure was scheduled for execution and did not finish yet
std::mutex Mutex;
TQueue<TFunction> ExecutionQueue = {};
std::queue<TFunction> ExecutionQueue = {};

public:
TSerialExecutor(IAsyncExecutor::TPtr executor);
Expand Down
1 change: 0 additions & 1 deletion client/ydb_persqueue_core/ut/basic_usage_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <library/cpp/threading/future/async.h>

#include <util/generic/ptr.h>
#include <util/generic/queue.h>
#include <util/string/join.h>
#include <util/system/event.h>
#include <util/stream/zlib.h>
Expand Down
3 changes: 2 additions & 1 deletion client/ydb_persqueue_core/ut/ut_utils/ut_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <client/ydb_persqueue_core/ut/ut_utils/sdk_test_setup.h>
#include <client/ydb_persqueue_core/impl/common.h>
#include <client/ydb_persqueue_core/impl/write_session.h>
#include <queue>

using namespace NKikimr;
using namespace NKikimr::NPersQueueTests;
Expand Down Expand Up @@ -387,7 +388,7 @@ class TYdbPqTestExecutor : public IAsyncExecutor {
TLockFreeQueue<TFunction> TasksQueue;
std::shared_ptr<TLockFreeQueue<ui64>> ExecIdsQueue;
THashMap<ui64, TFunction> Tasks;
TQueue<ui64> ExecIds;
std::queue<ui64> ExecIds;
ui64 CurrentTaskId = 0;
TThread Thread;

Expand Down
3 changes: 1 addition & 2 deletions client/ydb_topic/impl/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <client/ydb_topic/topic.h>
#include <client/ydb_common_client/impl/client.h>

#include <util/generic/queue.h>
#include <util/thread/pool.h>


Expand Down Expand Up @@ -58,7 +57,7 @@ class TSerialExecutor : public IAsyncExecutor, public std::enable_shared_from_th
IAsyncExecutor::TPtr Executor; //!< Wrapped executor that is actually doing the job
bool Busy = false; //!< Set if some closure was scheduled for execution and did not finish yet
std::mutex Mutex = {};
TQueue<TFunction> ExecutionQueue = {};
std::queue<TFunction> ExecutionQueue = {};

public:
TSerialExecutor(IAsyncExecutor::TPtr executor);
Expand Down
1 change: 0 additions & 1 deletion util/CMakeLists.darwin-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ target_joined_source(yutil
${CMAKE_SOURCE_DIR}/util/generic/object_counter.cpp
${CMAKE_SOURCE_DIR}/util/generic/overloaded.cpp
${CMAKE_SOURCE_DIR}/util/generic/ptr.cpp
${CMAKE_SOURCE_DIR}/util/generic/queue.cpp
${CMAKE_SOURCE_DIR}/util/generic/refcount.cpp
${CMAKE_SOURCE_DIR}/util/generic/scope.cpp
${CMAKE_SOURCE_DIR}/util/generic/set.cpp
Expand Down
1 change: 0 additions & 1 deletion util/CMakeLists.darwin-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ target_joined_source(yutil
${CMAKE_SOURCE_DIR}/util/generic/object_counter.cpp
${CMAKE_SOURCE_DIR}/util/generic/overloaded.cpp
${CMAKE_SOURCE_DIR}/util/generic/ptr.cpp
${CMAKE_SOURCE_DIR}/util/generic/queue.cpp
${CMAKE_SOURCE_DIR}/util/generic/refcount.cpp
${CMAKE_SOURCE_DIR}/util/generic/scope.cpp
${CMAKE_SOURCE_DIR}/util/generic/set.cpp
Expand Down
1 change: 0 additions & 1 deletion util/CMakeLists.linux-aarch64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ target_joined_source(yutil
${CMAKE_SOURCE_DIR}/util/generic/object_counter.cpp
${CMAKE_SOURCE_DIR}/util/generic/overloaded.cpp
${CMAKE_SOURCE_DIR}/util/generic/ptr.cpp
${CMAKE_SOURCE_DIR}/util/generic/queue.cpp
${CMAKE_SOURCE_DIR}/util/generic/refcount.cpp
${CMAKE_SOURCE_DIR}/util/generic/scope.cpp
${CMAKE_SOURCE_DIR}/util/generic/set.cpp
Expand Down
1 change: 0 additions & 1 deletion util/CMakeLists.linux-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ target_joined_source(yutil
${CMAKE_SOURCE_DIR}/util/generic/object_counter.cpp
${CMAKE_SOURCE_DIR}/util/generic/overloaded.cpp
${CMAKE_SOURCE_DIR}/util/generic/ptr.cpp
${CMAKE_SOURCE_DIR}/util/generic/queue.cpp
${CMAKE_SOURCE_DIR}/util/generic/refcount.cpp
${CMAKE_SOURCE_DIR}/util/generic/scope.cpp
${CMAKE_SOURCE_DIR}/util/generic/set.cpp
Expand Down
1 change: 0 additions & 1 deletion util/CMakeLists.windows-x86_64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ target_joined_source(yutil
${CMAKE_SOURCE_DIR}/util/generic/object_counter.cpp
${CMAKE_SOURCE_DIR}/util/generic/overloaded.cpp
${CMAKE_SOURCE_DIR}/util/generic/ptr.cpp
${CMAKE_SOURCE_DIR}/util/generic/queue.cpp
${CMAKE_SOURCE_DIR}/util/generic/refcount.cpp
${CMAKE_SOURCE_DIR}/util/generic/scope.cpp
${CMAKE_SOURCE_DIR}/util/generic/set.cpp
Expand Down
6 changes: 0 additions & 6 deletions util/generic/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ class TVector;
template <class T, class A = std::allocator<T>>
class TDeque;

template <class T, class S = TDeque<T>>
class TQueue;

template <class T, class S = std::vector<T>, class C = TLess<T>>
class TPriorityQueue;

template <class Key, class T, class HashFcn = THash<Key>, class EqualKey = TEqualTo<Key>, class Alloc = std::allocator<Key>>
class THashMap;

Expand Down
1 change: 0 additions & 1 deletion util/generic/queue.cpp

This file was deleted.

57 changes: 0 additions & 57 deletions util/generic/queue.h

This file was deleted.

210 changes: 0 additions & 210 deletions util/generic/queue_ut.cpp

This file was deleted.

Loading

0 comments on commit a6de641

Please sign in to comment.