feat update
This commit is contained in:
parent
bc80738c27
commit
ffdbf161b4
@ -1,12 +1,12 @@
|
||||
# Generated from CLion C/C++ Code Style settings
|
||||
BinPackParameters: false
|
||||
BinPackArguments: false
|
||||
BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments: Consecutive
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignOperands: BreakBeforeBinaryOperators
|
||||
AlignOperands: Align
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
@ -33,6 +33,7 @@ BraceWrapping:
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: true
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
BreakBeforeBinaryOperators: All
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
|
@ -46,7 +46,7 @@ struct DelayOperation {
|
||||
|
||||
template<typename S>
|
||||
struct DelaySender {
|
||||
using result_t = typename S::result_t;
|
||||
using result_t = typename S::result_t;
|
||||
using this_type = DelaySender<S>;
|
||||
S sender;
|
||||
sled::TimeDelta delta;
|
||||
|
@ -55,7 +55,7 @@ struct FutureOperation {
|
||||
|
||||
template<typename T>
|
||||
struct FutureSender {
|
||||
using result_t = T;
|
||||
using result_t = T;
|
||||
using this_type = FutureSender<T>;
|
||||
std::shared_ptr<FutureState<T>> state;
|
||||
|
||||
|
@ -19,7 +19,7 @@ struct JustOperation {
|
||||
|
||||
template<typename T>
|
||||
struct JustSender {
|
||||
using result_t = T;
|
||||
using result_t = T;
|
||||
using this_type = JustSender<T>;
|
||||
T value;
|
||||
|
||||
|
@ -66,7 +66,7 @@ struct OnOperation {
|
||||
|
||||
template<typename S, typename F>
|
||||
struct OnSender {
|
||||
using result_t = typename S::result_t;
|
||||
using result_t = typename S::result_t;
|
||||
using this_type = OnSender<S, F>;
|
||||
S sender;
|
||||
F schedule;
|
||||
|
@ -16,7 +16,7 @@ struct RetryState {
|
||||
sled::Mutex mutex;
|
||||
sled::ConditionVariable cv;
|
||||
int retry_count = 0;
|
||||
State state = kPending;
|
||||
State state = kPending;
|
||||
};
|
||||
}// namespace
|
||||
|
||||
@ -61,7 +61,7 @@ struct RetryReceiver {
|
||||
{
|
||||
sled::MutexLock lock(&state->mutex);
|
||||
if (stopped) { return; }
|
||||
stopped = true;
|
||||
stopped = true;
|
||||
state->state = RetryState::kDone;
|
||||
state->cv.NotifyAll();
|
||||
}
|
||||
@ -80,7 +80,7 @@ struct RetryOperation {
|
||||
{
|
||||
sled::MutexLock lock(&state->mutex);
|
||||
state->retry_count = retry_count;
|
||||
state->state = RetryState::kPending;
|
||||
state->state = RetryState::kPending;
|
||||
}
|
||||
do {
|
||||
op.Start();
|
||||
@ -96,7 +96,7 @@ struct RetryOperation {
|
||||
|
||||
template<typename S>
|
||||
struct RetrySender {
|
||||
using result_t = typename S::result_t;
|
||||
using result_t = typename S::result_t;
|
||||
using this_type = RetrySender<S>;
|
||||
S sender;
|
||||
int retry_count;
|
||||
@ -105,7 +105,7 @@ struct RetrySender {
|
||||
RetryOperation<S, RetryReceiver<R>> Connect(R receiver)
|
||||
{
|
||||
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};
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ struct ThenOperation {
|
||||
|
||||
template<typename S, typename F>
|
||||
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>;
|
||||
S sender;
|
||||
F func;
|
||||
|
@ -38,7 +38,7 @@ struct move_on_copy {
|
||||
|
||||
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;
|
||||
|
||||
mutable type value;
|
||||
|
Loading…
Reference in New Issue
Block a user