Skip to content

Comments

add assert and [[nodiscard]] for spinlock#413

Merged
ChuanqiXu9 merged 3 commits intoalibaba:mainfrom
poor-circle:main
Jan 21, 2025
Merged

add assert and [[nodiscard]] for spinlock#413
ChuanqiXu9 merged 3 commits intoalibaba:mainfrom
poor-circle:main

Conversation

@poor-circle
Copy link
Collaborator

Why

  1. Close async_simple::coro::Mutex should contain <cassert> head file #391
  2. We found some mistake use of spinlock in user issue

What is changing

  1. add cassert header for Mutex.h
  2. add nodiscard attribute for SpinLock::coScopedLock()
  3. add assert for SpinLock::unlock()

Example

@ChuanqiXu9
Copy link
Collaborator

Please take a look at the cmake failure

@ChuanqiXu9 ChuanqiXu9 merged commit 05f432e into alibaba:main Jan 21, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

async_simple::coro::Mutex should contain <cassert> head file

2 participants