You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when cancel a coroutine we trigger a cancel panic inside it. This would cause the mutex got poisoned if it not in the wait state. A better and elegant way is to let the mutex finish normally.
this is possible when you hold a mutex guard, and wait for other resources in the coroutine. when the cancel comes, it will run the mutex guard drop in a panicking context while unwind the stack.
and this is only valid in coroutine context, we can't cancel a thread.
The text was updated successfully, but these errors were encountered:
when cancel a coroutine we trigger a cancel panic inside it. This would cause the mutex got poisoned if it not in the wait state. A better and elegant way is to let the mutex finish normally.
this is possible when you hold a mutex guard, and wait for other resources in the coroutine. when the cancel comes, it will run the mutex guard drop in a panicking context while unwind the stack.
and this is only valid in coroutine context, we can't cancel a thread.
The text was updated successfully, but these errors were encountered: