mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Slight performance improvement.
Only need to check whether the current program is blocked, since the other will have switched if it was going to block.
This commit is contained in:
@@ -117,7 +117,7 @@ end
|
|||||||
while true do
|
while true do
|
||||||
instr = instructions[iptr[pid]]
|
instr = instructions[iptr[pid]]
|
||||||
|
|
||||||
if waiting[0] and waiting[1] then
|
if waiting[pid] then
|
||||||
print("Deadlocked!")
|
print("Deadlocked!")
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user