aboutsummaryrefslogtreecommitdiff
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)
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)
+ }
+ }
}