summary refs log tree commit diff stats
path: root/cmd
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-09 20:39:00 -0500
committerDrew DeVault <sir@cmpwn.com>2018-01-09 20:39:00 -0500
commit6394e386c2a88c3b376cd422a7b7ce5ae7534984 (patch)
tree2d78f622096e439cf5d91a090999f5c522796c42 /cmd
parent7d0edcc9e7ecdedb8cabafac1167581d7205596e (diff)
downloadaerc-6394e386c2a88c3b376cd422a7b7ce5ae7534984.tar.gz
Initial pass on worker/UI message passing
Diffstat (limited to 'cmd')
-rw-r--r--cmd/aerc/main.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/aerc/main.go b/cmd/aerc/main.go
index 96a8e0c..2627a71 100644
--- a/cmd/aerc/main.go
+++ b/cmd/aerc/main.go
@@ -4,6 +4,8 @@ import (
 	"fmt"
 
 	"git.sr.ht/~sircmpwn/aerc2/config"
+	"git.sr.ht/~sircmpwn/aerc2/worker"
+	"git.sr.ht/~sircmpwn/aerc2/worker/types"
 )
 
 func main() {
@@ -15,4 +17,12 @@ func main() {
 		panic(err)
 	}
 	fmt.Printf("%+v\n", *c)
+	w := worker.NewWorker("")
+	go w.Run()
+	w.PostAction(types.Ping{})
+	for {
+		if msg := w.GetMessage(); msg != nil {
+			fmt.Printf("<- %T: %v\n", msg, msg)
+		}
+	}
 }
ref='#n118'>118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161