Skip to content

Commit 01323a3

Browse files
committed
fixup! src: fix deadlock in NodePlatform::DrainTasks on process shutdown
Fix clang-format alignment issues in node_mutex.h: - Split cond_timedwait parameters onto separate lines - Correct continuation alignment in TimedWait implementation
1 parent ad5aabb commit 01323a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/node_mutex.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ struct LibuvMutexTraits {
178178
uv_cond_wait(cond, mutex);
179179
}
180180

181-
static inline int cond_timedwait(CondT* cond, MutexT* mutex,
181+
static inline int cond_timedwait(CondT* cond,
182+
MutexT* mutex,
182183
uint64_t timeout) {
183184
return uv_cond_timedwait(cond, mutex, timeout);
184185
}
@@ -259,9 +260,9 @@ void ConditionVariableBase<Traits>::Wait(const ScopedLock& scoped_lock) {
259260

260261
template <typename Traits>
261262
bool ConditionVariableBase<Traits>::TimedWait(const ScopedLock& scoped_lock,
262-
uint64_t timeout_ns) {
263+
uint64_t timeout_ns) {
263264
return Traits::cond_timedwait(
264-
&cond_, &scoped_lock.mutex_.mutex_, timeout_ns) == 0;
265+
&cond_, &scoped_lock.mutex_.mutex_, timeout_ns) == 0;
265266
}
266267

267268
template <typename Traits>

0 commit comments

Comments
 (0)