summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-09-22 20:57:03 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-09-22 20:57:03 +0200
commit3a9ab4902cb4c03276079194c4561815fa5cfb3a (patch)
tree4e2d6e4d56aacf0805f46ce5d3217a7b55214106
parentd5a663995dcce996bdfeb08f411cb69217e3e32e (diff)
Unify state names
-rw-r--r--philo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/philo.go b/philo.go
index 19e555a..c849add 100644
--- a/philo.go
+++ b/philo.go
@@ -54,13 +54,13 @@ func hungry(p *Philo) stateFn {
return eat
case <-time.After(time.Second):
p.LHS <- true // put left fork back
- return starving
+ return starve
}
return eat
}
-func starving(p *Philo) stateFn {
+func starve(p *Philo) stateFn {
p.state("is starving")
rndDelay()