Skip to content

Commit

Permalink
improving code for train deadlocking
Browse files Browse the repository at this point in the history
  • Loading branch information
cutajarj committed Jun 13, 2020
1 parent 577e39e commit 96cb654
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion deadlocks_train/arbitrator/train.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func lockIntersectionsInDistance(id, reserveStart int, reserveEnd int, crossings
}

func MoveTrain(train *Train, distance int, crossings []*Crossing) {
//time.Sleep(time.Duration(rand.Intn(3000)) * time.Millisecond)
for train.Front < distance {
train.Front += 1
for _, crossing := range crossings {
Expand Down
1 change: 0 additions & 1 deletion deadlocks_train/hierarchy/train.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func lockIntersectionsInDistance(id, reserveStart int, reserveEnd int, crossings
}

func MoveTrain(train *Train, distance int, crossings []*Crossing) {
//time.Sleep(time.Duration(rand.Intn(3000)) * time.Millisecond)
for train.Front < distance {
train.Front += 1
for _, crossing := range crossings {
Expand Down

0 comments on commit 96cb654

Please sign in to comment.