@@ -259,45 +259,23 @@ func (q *Queue) IsEmpty() bool {
259
259
return q .list .Front () == nil
260
260
}
261
261
262
- // AlwaysReady implements the Waitable interface but is always ready. Embedding
263
- // this struct into another struct makes it implement the boilerplate empty
264
- // functions automatically.
265
- type AlwaysReady struct {
266
- }
267
-
268
- // Readiness always returns the input mask because this object is always ready.
269
- func (* AlwaysReady ) Readiness (mask EventMask ) EventMask {
270
- return mask
271
- }
272
-
273
- // EventRegister doesn't do anything because this object doesn't need to issue
274
- // notifications because its readiness never changes.
275
- func (* AlwaysReady ) EventRegister (* Entry ) error {
276
- return nil
277
- }
278
-
279
- // EventUnregister doesn't do anything because this object doesn't need to issue
280
- // notifications because its readiness never changes.
281
- func (* AlwaysReady ) EventUnregister (e * Entry ) {
282
- }
283
-
284
262
// NeverReady implements the Waitable interface but is never ready. Otherwise,
285
263
// this is exactly the same as AlwaysReady.
286
264
type NeverReady struct {
287
265
}
288
266
289
- // Readiness always returns the input mask because this object is always ready.
290
- func (* NeverReady ) Readiness (mask EventMask ) EventMask {
291
- return mask
267
+ // Readiness always returns 0 because this object is never ready.
268
+ func (* NeverReady ) Readiness (EventMask ) EventMask {
269
+ return 0
292
270
}
293
271
294
272
// EventRegister doesn't do anything because this object doesn't need to issue
295
273
// notifications because its readiness never changes.
296
- func (* NeverReady ) EventRegister (e * Entry ) error {
274
+ func (* NeverReady ) EventRegister (* Entry ) error {
297
275
return nil
298
276
}
299
277
300
278
// EventUnregister doesn't do anything because this object doesn't need to issue
301
279
// notifications because its readiness never changes.
302
- func (* NeverReady ) EventUnregister (e * Entry ) {
280
+ func (* NeverReady ) EventUnregister (* Entry ) {
303
281
}
0 commit comments