File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ func (t *EventLoop) WaitForEvents(rendererWaitEvents func(float64)) {
100
100
101
101
// Fire expired tasks.
102
102
for _ , item := range expiredTasks {
103
- task := item .Value .(embedder. FlutterTask )
103
+ task := item .Value
104
104
if t .onExpiredTask (& task ) != embedder .ResultSuccess {
105
105
fmt .Printf ("go-flutter: couldn't process task %v\n " , task )
106
106
}
Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ package priorityqueue
3
3
import (
4
4
"sync"
5
5
"time"
6
+
7
+ "github.com/go-flutter-desktop/go-flutter/embedder"
6
8
)
7
9
8
10
// An Item is something we manage in a priority queue.
9
11
type Item struct {
10
- Value interface {} // The value of the item; arbitrary.
11
- FireTime time.Time // The priority of the item in the queue.
12
+ Value embedder. FlutterTask // The value of the item
13
+ FireTime time.Time // The priority of the item in the queue.
12
14
13
15
// The index is needed by update and is maintained by the heap.Interface methods.
14
16
index int // The index of the item in the heap.
You can’t perform that action at this time.
0 commit comments