feat remove marl
Some checks failed
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 46s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 42s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 47s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 1m2s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 37s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 52s
Some checks failed
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (push) Failing after 46s
linux-arm-gcc / linux-gcc-armhf (push) Failing after 42s
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Failing after 47s
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Failing after 1m2s
linux-x64-gcc / linux-gcc (Debug) (push) Failing after 37s
linux-x64-gcc / linux-gcc (Release) (push) Failing after 52s
This commit is contained in:
parent
be0d0922f9
commit
1f8a250845
@ -39,9 +39,9 @@ add_subdirectory(3party/minilua EXCLUDE_FROM_ALL)
|
||||
if(SLED_WITH_PROTOBUF)
|
||||
add_subdirectory(3party/protobuf-3.21.12 EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
if(NOT TARGET marl)
|
||||
add_subdirectory(3party/marl EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
# if(NOT TARGET marl)
|
||||
# add_subdirectory(3party/marl EXCLUDE_FROM_ALL)
|
||||
# endif()
|
||||
|
||||
if(NOT TARGET rpc_core)
|
||||
add_subdirectory(3party/rpc_core EXCLUDE_FROM_ALL)
|
||||
@ -106,7 +106,7 @@ target_sources(
|
||||
|
||||
target_link_libraries(
|
||||
sled
|
||||
PUBLIC rpc_core fmt marl minilua asio
|
||||
PUBLIC rpc_core fmt minilua asio
|
||||
# protobuf::libprotoc
|
||||
PRIVATE dl)
|
||||
# if(CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries(sled PUBLIC
|
||||
@ -191,7 +191,7 @@ if(SLED_BUILD_TESTS)
|
||||
src/sled/status_or_test.cc
|
||||
src/sled/strings/utils_test.cc
|
||||
src/sled/strings/base64_test.cc
|
||||
src/sled/system/fiber/fiber_test.cc
|
||||
# src/sled/system/fiber/fiber_test.cc
|
||||
src/sled/system/thread_pool_test.cc
|
||||
# src/sled/rx_test.cc
|
||||
src/sled/uri_test.cc)
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "sled/sigslot.h"
|
||||
#include "sled/synchronization/mutex.h"
|
||||
#include <typeindex>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace sled {
|
||||
|
||||
@ -181,7 +182,7 @@ public:
|
||||
|
||||
private:
|
||||
sled::Mutex mutex_;
|
||||
std::unordered_map<std::type_index, std::function<void(EventBus *)>> cleanup_handlers_ GUARDED_BY(mutex_);
|
||||
std::unordered_map<std::type_index, std::function<void(EventBus *)>> cleanup_handlers_;//GUARDED_BY(mutex_);
|
||||
};
|
||||
}// namespace sled
|
||||
#endif// SLED_EVENT_BUS_EVENT_BUS_H
|
||||
|
@ -20,22 +20,22 @@ typedef int SOCKET;
|
||||
namespace sled {
|
||||
|
||||
enum DispatcherEvent {
|
||||
DE_READ = 0x0001,
|
||||
DE_WRITE = 0x0002,
|
||||
DE_READ = 0x0001,
|
||||
DE_WRITE = 0x0002,
|
||||
DE_CONNECT = 0x0004,
|
||||
DE_CLOSE = 0x0008,
|
||||
DE_ACCEPT = 0x0010,
|
||||
DE_CLOSE = 0x0008,
|
||||
DE_ACCEPT = 0x0010,
|
||||
};
|
||||
|
||||
class Signaler;
|
||||
|
||||
class Dispatcher {
|
||||
public:
|
||||
virtual ~Dispatcher() = default;
|
||||
virtual uint32_t GetRequestedEvents() = 0;
|
||||
virtual ~Dispatcher() = default;
|
||||
virtual uint32_t GetRequestedEvents() = 0;
|
||||
virtual void OnEvent(uint32_t ff, int err) = 0;
|
||||
|
||||
virtual int GetDescriptor() = 0;
|
||||
virtual int GetDescriptor() = 0;
|
||||
virtual bool IsDescriptorClosed() = 0;
|
||||
};
|
||||
|
||||
@ -59,9 +59,9 @@ private:
|
||||
bool WaitSelect(int64_t cusWait, bool process_io);
|
||||
|
||||
uint64_t next_dispatcher_key_ = 0;
|
||||
std::unordered_map<uint64_t, Dispatcher *> dispatcher_by_key_ GUARDED_BY(lock_);
|
||||
std::unordered_map<Dispatcher *, uint64_t> key_by_dispatcher_ GUARDED_BY(lock_);
|
||||
std::vector<uint64_t> current_dispatcher_keys_ GUARDED_BY(lock_);
|
||||
std::unordered_map<uint64_t, Dispatcher *> dispatcher_by_key_;//GUARDED_BY(lock_);
|
||||
std::unordered_map<Dispatcher *, uint64_t> key_by_dispatcher_;//GUARDED_BY(lock_);
|
||||
std::vector<uint64_t> current_dispatcher_keys_; //GUARDED_BY(lock_);
|
||||
Signaler *signal_wakeup_;
|
||||
// Mutex lock_;
|
||||
RecursiveMutex lock_;
|
||||
@ -124,7 +124,7 @@ protected:
|
||||
bool udp_;
|
||||
int family_ = 0;
|
||||
mutable Mutex mutex_;
|
||||
int error_ GUARDED_BY(mutex_);
|
||||
int error_;//GUARDED_BY(mutex_);
|
||||
ConnState state_;
|
||||
AsyncResolver *resolver_;
|
||||
|
||||
|
@ -65,8 +65,8 @@
|
||||
#include "sled/synchronization/sequence_checker.h"
|
||||
#include "sled/synchronization/thread_local.h"
|
||||
// system
|
||||
#include "sled/system/fiber/scheduler.h"
|
||||
#include "sled/system/fiber/wait_group.h"
|
||||
// #include "sled/system/fiber/scheduler.h"
|
||||
// #include "sled/system/fiber/wait_group.h"
|
||||
#include "sled/system/location.h"
|
||||
#include "sled/system/thread.h"
|
||||
#include "sled/system/thread_pool.h"
|
||||
|
@ -11,8 +11,11 @@
|
||||
#include "sled/lang/attributes.h"
|
||||
#include "sled/units/time_delta.h"
|
||||
#include <chrono>
|
||||
#include <marl/conditionvariable.h>
|
||||
#include <marl/mutex.h>
|
||||
// #include <marl/conditionvariable.h>
|
||||
// #include <marl/mutex.h>
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
// #include <condition_variable>
|
||||
// #include <mutex>
|
||||
#include <type_traits>
|
||||
@ -50,7 +53,8 @@ public:
|
||||
inline void Unlock() SLED_UNLOCK_FUNCTION(impl_) { impl_.unlock(); }
|
||||
|
||||
private:
|
||||
marl::mutex impl_;
|
||||
// marl::mutex impl_;
|
||||
std::mutex impl_;
|
||||
friend class ConditionVariable;
|
||||
friend class MutexLock;
|
||||
};
|
||||
@ -110,7 +114,8 @@ public:
|
||||
|
||||
private:
|
||||
friend class ConditionVariable;
|
||||
marl::lock lock_;
|
||||
// marl::lock lock_;
|
||||
std::unique_lock<std::mutex> lock_;
|
||||
};
|
||||
|
||||
class ConditionVariable final {
|
||||
@ -143,10 +148,11 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
marl::ConditionVariable cv_;
|
||||
std::condition_variable cv_;
|
||||
// marl::ConditionVariable cv_;
|
||||
};
|
||||
|
||||
class SCOPED_CAPABILITY SharedMutex final {
|
||||
class SharedMutex final {
|
||||
public:
|
||||
enum class Mode {
|
||||
kReaderPriority,
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
bool happended_ GUARDED_BY(mutex_) = false;
|
||||
bool happended_;//GUARDED_BY(mutex_) = false;
|
||||
Mutex mutex_;
|
||||
};
|
||||
|
||||
|
@ -30,9 +30,9 @@ public:
|
||||
|
||||
private:
|
||||
mutable Mutex mutex_;
|
||||
mutable bool attached_ GUARDED_BY(mutex_);
|
||||
mutable pthread_t valid_thread_ GUARDED_BY(mutex_);
|
||||
mutable const TaskQueueBase *valid_queue_ GUARDED_BY(mutex_);
|
||||
mutable bool attached_; //GUARDED_BY(mutex_);
|
||||
mutable pthread_t valid_thread_; //GUARDED_BY(mutex_);
|
||||
mutable const TaskQueueBase *valid_queue_;//GUARDED_BY(mutex_);
|
||||
};
|
||||
|
||||
class SequenceCheckerDoNothing {
|
||||
|
@ -135,9 +135,9 @@ private:
|
||||
void ClearCurrentTaskQueue();
|
||||
|
||||
mutable Mutex mutex_;
|
||||
std::queue<std::function<void()>> messages_ GUARDED_BY(mutex_);
|
||||
std::priority_queue<DelayedMessage> delayed_messages_ GUARDED_BY(mutex_);
|
||||
uint32_t delayed_next_num_ GUARDED_BY(mutex_);
|
||||
std::queue<std::function<void()>> messages_; //GUARDED_BY(mutex_);
|
||||
std::priority_queue<DelayedMessage> delayed_messages_;//GUARDED_BY(mutex_);
|
||||
uint32_t delayed_next_num_; //GUARDED_BY(mutex_);
|
||||
bool fInitialized_;
|
||||
bool fDestroyed_;
|
||||
std::atomic<int> stop_;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifndef SLED_SYSTEM_THREAD_POOL_H
|
||||
#define SLED_SYSTEM_THREAD_POOL_H
|
||||
#include "sled/synchronization/mutex.h"
|
||||
#include "sled/system/fiber/scheduler.h"
|
||||
// #include "sled/system/fiber/scheduler.h"
|
||||
#include "sled/system/thread.h"
|
||||
#include <functional>
|
||||
#include <future>
|
||||
|
Loading…
x
Reference in New Issue
Block a user