summaryrefslogtreecommitdiffhomepage
path: root/pkg/waiter
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/waiter')
-rw-r--r--pkg/waiter/waiter.go2
-rw-r--r--pkg/waiter/waiter_state_autogen.go9
2 files changed, 6 insertions, 5 deletions
diff --git a/pkg/waiter/waiter.go b/pkg/waiter/waiter.go
index 67a950444..08519d986 100644
--- a/pkg/waiter/waiter.go
+++ b/pkg/waiter/waiter.go
@@ -168,7 +168,7 @@ func NewChannelEntry(c chan struct{}) (Entry, chan struct{}) {
//
// +stateify savable
type Queue struct {
- list waiterList `state:"zerovalue"`
+ list waiterList
mu sync.RWMutex `state:"nosave"`
}
diff --git a/pkg/waiter/waiter_state_autogen.go b/pkg/waiter/waiter_state_autogen.go
index 95ca472de..e1287330a 100644
--- a/pkg/waiter/waiter_state_autogen.go
+++ b/pkg/waiter/waiter_state_autogen.go
@@ -40,21 +40,22 @@ func (q *Queue) StateTypeName() string {
}
func (q *Queue) StateFields() []string {
- return []string{}
+ return []string{
+ "list",
+ }
}
func (q *Queue) beforeSave() {}
func (q *Queue) StateSave(stateSinkObject state.Sink) {
q.beforeSave()
- if !state.IsZeroValue(&q.list) {
- state.Failf("list is %#v, expected zero", &q.list)
- }
+ stateSinkObject.Save(0, &q.list)
}
func (q *Queue) afterLoad() {}
func (q *Queue) StateLoad(stateSourceObject state.Source) {
+ stateSourceObject.Load(0, &q.list)
}
func (l *waiterList) StateTypeName() string {