Reverted event changes

This feature was not needed for Android, upon further inspection.
This commit is contained in:
Mathias Hall-Andersen
2018-02-11 18:55:30 +01:00
parent b461343171
commit 73cb1a1155
3 changed files with 18 additions and 57 deletions

View File

@@ -1,36 +0,0 @@
package events
import (
"sync"
)
type Event interface {
Contains(int) bool
Processed()
WaitForProcessed()
}
type EventStruct struct {
code int
lock sync.Mutex
}
func (event EventStruct) Contains(code int) bool {
return event.code&code != 0
}
func (event *EventStruct) WaitForProcessed() {
event.lock.Lock()
}
func (event *EventStruct) Processed() {
event.lock.Unlock()
}
func NewEvent(code int) Event {
event := &EventStruct{
code: code,
}
event.lock.Lock()
return event
}