Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ BraceWrapping:
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterCaseLabel: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true

# --- Spaces ---
SpaceBeforeParens: Always
Expand All @@ -48,6 +50,7 @@ AlignConsecutiveDeclarations: false

# --- Switch/Case ---
IndentCaseLabels: true
IndentCaseBlocks: true

# --- Strict Vertical Layout ---
AllowShortFunctionsOnASingleLine: None
Expand Down
10 changes: 5 additions & 5 deletions core/src/reactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int Reactor::addHandler (int fd, EventHandler* handler, bool sync) noexcept
std::atomic<bool> done{false}, *pdone = nullptr;
std::atomic<int> errc{0}, *perrc = nullptr;

if (JOIN_UNLIKELY (sync))
if (JOIN_LIKELY (sync))
{
pdone = &done;
perrc = &errc;
Expand All @@ -124,7 +124,7 @@ int Reactor::addHandler (int fd, EventHandler* handler, bool sync) noexcept
return -1;
}

if (JOIN_UNLIKELY (sync))
if (JOIN_LIKELY (sync))
{
Backoff backoff;
while (!done.load (std::memory_order_acquire))
Expand Down Expand Up @@ -163,7 +163,7 @@ int Reactor::delHandler (int fd, bool sync) noexcept
std::atomic<bool> done{false}, *pdone = nullptr;
std::atomic<int> errc{0}, *perrc = nullptr;

if (JOIN_UNLIKELY (sync))
if (JOIN_LIKELY (sync))
{
pdone = &done;
perrc = &errc;
Expand All @@ -174,7 +174,7 @@ int Reactor::delHandler (int fd, bool sync) noexcept
return -1;
}

if (JOIN_UNLIKELY (sync))
if (JOIN_LIKELY (sync))
{
Backoff backoff;
while (!done.load (std::memory_order_acquire))
Expand Down Expand Up @@ -222,7 +222,7 @@ void Reactor::stop (bool sync) noexcept

writeCommand ({CommandType::Stop, -1, nullptr, nullptr, nullptr});

if (JOIN_UNLIKELY (sync))
if (JOIN_LIKELY (sync))
{
Backoff backoff;
while (_threadId.load (std::memory_order_acquire) != 0)
Expand Down
3 changes: 2 additions & 1 deletion services/include/join/httpserver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ namespace join

this->writeResponse ();
this->cleanUp ();
} while ((this->_max < 0) || (--this->_max != 0));
}
while ((this->_max < 0) || (--this->_max != 0));

this->endRequest ();
}
Expand Down
Loading