feat update
All checks were successful
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 1m36s
linux-x64-gcc / linux-gcc (Release) (push) Successful in 1m37s

This commit is contained in:
tqcq 2024-03-26 13:06:31 +08:00
parent bc80738c27
commit ffdbf161b4
8 changed files with 14 additions and 13 deletions

View File

@ -1,12 +1,12 @@
# Generated from CLion C/C++ Code Style settings # Generated from CLion C/C++ Code Style settings
BinPackParameters: false BinPackParameters: false
BinPackArguments: false
BasedOnStyle: LLVM BasedOnStyle: LLVM
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignArrayOfStructures: Left AlignArrayOfStructures: Left
AlignConsecutiveAssignments: Consecutive AlignConsecutiveAssignments: Consecutive
AlignConsecutiveAssignments: None AlignOperands: Align
AlignOperands: BreakBeforeBinaryOperators
AllowAllArgumentsOnNextLine: false AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false
@ -33,6 +33,7 @@ BraceWrapping:
IndentBraces: false IndentBraces: false
SplitEmptyFunction: false SplitEmptyFunction: false
SplitEmptyRecord: true SplitEmptyRecord: true
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: All BreakBeforeBinaryOperators: All
BreakBeforeTernaryOperators: true BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon BreakConstructorInitializers: BeforeColon

View File

@ -46,7 +46,7 @@ struct DelayOperation {
template<typename S> template<typename S>
struct DelaySender { struct DelaySender {
using result_t = typename S::result_t; using result_t = typename S::result_t;
using this_type = DelaySender<S>; using this_type = DelaySender<S>;
S sender; S sender;
sled::TimeDelta delta; sled::TimeDelta delta;

View File

@ -55,7 +55,7 @@ struct FutureOperation {
template<typename T> template<typename T>
struct FutureSender { struct FutureSender {
using result_t = T; using result_t = T;
using this_type = FutureSender<T>; using this_type = FutureSender<T>;
std::shared_ptr<FutureState<T>> state; std::shared_ptr<FutureState<T>> state;

View File

@ -19,7 +19,7 @@ struct JustOperation {
template<typename T> template<typename T>
struct JustSender { struct JustSender {
using result_t = T; using result_t = T;
using this_type = JustSender<T>; using this_type = JustSender<T>;
T value; T value;

View File

@ -66,7 +66,7 @@ struct OnOperation {
template<typename S, typename F> template<typename S, typename F>
struct OnSender { struct OnSender {
using result_t = typename S::result_t; using result_t = typename S::result_t;
using this_type = OnSender<S, F>; using this_type = OnSender<S, F>;
S sender; S sender;
F schedule; F schedule;

View File

@ -16,7 +16,7 @@ struct RetryState {
sled::Mutex mutex; sled::Mutex mutex;
sled::ConditionVariable cv; sled::ConditionVariable cv;
int retry_count = 0; int retry_count = 0;
State state = kPending; State state = kPending;
}; };
}// namespace }// namespace
@ -61,7 +61,7 @@ struct RetryReceiver {
{ {
sled::MutexLock lock(&state->mutex); sled::MutexLock lock(&state->mutex);
if (stopped) { return; } if (stopped) { return; }
stopped = true; stopped = true;
state->state = RetryState::kDone; state->state = RetryState::kDone;
state->cv.NotifyAll(); state->cv.NotifyAll();
} }
@ -80,7 +80,7 @@ struct RetryOperation {
{ {
sled::MutexLock lock(&state->mutex); sled::MutexLock lock(&state->mutex);
state->retry_count = retry_count; state->retry_count = retry_count;
state->state = RetryState::kPending; state->state = RetryState::kPending;
} }
do { do {
op.Start(); op.Start();
@ -96,7 +96,7 @@ struct RetryOperation {
template<typename S> template<typename S>
struct RetrySender { struct RetrySender {
using result_t = typename S::result_t; using result_t = typename S::result_t;
using this_type = RetrySender<S>; using this_type = RetrySender<S>;
S sender; S sender;
int retry_count; int retry_count;
@ -105,7 +105,7 @@ struct RetrySender {
RetryOperation<S, RetryReceiver<R>> Connect(R receiver) RetryOperation<S, RetryReceiver<R>> Connect(R receiver)
{ {
auto state = std::make_shared<RetryState>(); auto state = std::make_shared<RetryState>();
auto op = sender.Connect(RetryReceiver<R>{state, receiver}); auto op = sender.Connect(RetryReceiver<R>{state, receiver});
return {retry_count, state, op}; return {retry_count, state, op};
} }

View File

@ -49,7 +49,7 @@ struct ThenOperation {
template<typename S, typename F> template<typename S, typename F>
struct ThenSender { struct ThenSender {
using result_t = invoke_result_t<F, typename decay_t<S>::result_t>; using result_t = invoke_result_t<F, typename decay_t<S>::result_t>;
using this_type = ThenSender<S, F>; using this_type = ThenSender<S, F>;
S sender; S sender;
F func; F func;

View File

@ -38,7 +38,7 @@ struct move_on_copy {
move_on_copy(const move_on_copy &other) : value(std::move(other.value)) {} move_on_copy(const move_on_copy &other) : value(std::move(other.value)) {}
move_on_copy(move_on_copy &&) = delete; move_on_copy(move_on_copy &&) = delete;
move_on_copy &operator=(const move_on_copy &) = delete; move_on_copy &operator=(const move_on_copy &) = delete;
mutable type value; mutable type value;