Skip to content

Commit

Permalink
Patch up race condition exposed in #478
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyene committed Sep 29, 2019
1 parent a6a1a74 commit 59d7b83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dmoj/judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ def grading_cleanup_wrapper():
self.current_submission_thread.daemon = True
self.current_submission_thread.start()

if blocking:
# Submission may have been killed already, but block if it hasn't been.
if blocking and self.current_submission_thread is not None:
self.current_submission_thread.join()

def grade_cases(self, grader, cases, short_circuit=False, is_short_circuiting=False):
Expand Down

0 comments on commit 59d7b83

Please sign in to comment.