Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
aoli-al committed Jul 17, 2024
1 parent d476821 commit 5ee8b10
Show file tree
Hide file tree
Showing 4 changed files with 635 additions and 12 deletions.
4 changes: 3 additions & 1 deletion core/src/main/kotlin/cmu/pasta/fray/core/GlobalContext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,9 @@ object GlobalContext {
currentThread.state == ThreadState.Completed)
assert(registeredThreads.none { it.value.state == ThreadState.Running })

if (terminatingThread.contains(currentThread.index)) {
if (terminatingThread.contains(currentThread.index) &&
!currentThread.isExiting &&
!(Thread.currentThread() is HelperThread)) {
currentThread.state = ThreadState.Running
terminatingThread.remove(currentThread.index)
throw DeadlockException()
Expand Down
Loading

0 comments on commit 5ee8b10

Please sign in to comment.