diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-09 20:39:00 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-01-09 20:39:00 -0500 |
commit | 6394e386c2a88c3b376cd422a7b7ce5ae7534984 (patch) | |
tree | 2d78f622096e439cf5d91a090999f5c522796c42 /cmd | |
parent | 7d0edcc9e7ecdedb8cabafac1167581d7205596e (diff) | |
download | aerc-6394e386c2a88c3b376cd422a7b7ce5ae7534984.tar.gz |
Initial pass on worker/UI message passing
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/aerc/main.go | 10 |
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) + } + } } |