aboutsummaryrefslogtreecommitdiffstats
path: root/worker/worker.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-10-06 11:46:41 -0500
committerRobin Jarry <robin@jarry.cc>2022-10-07 10:51:53 +0200
commitbb1249164d8de6d821dcf3293f5ff2650be95481 (patch)
tree8dd0194a877a226a976baeb253cb1fe9d77fa70e /worker/worker.go
parentd847073bdf67a2fd8c8695dbacbe010bcbfd27c8 (diff)
downloadaerc-bb1249164d8de6d821dcf3293f5ff2650be95481.tar.gz
aerc: use single event loop
Combine tcell events with WorkerMessages to better synchronize state with IO and UI. Remove Tick loop for rendering. Use events to trigger renders. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/worker/worker.go b/worker/worker.go
index 2af892c4..bef5b727 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -9,12 +9,12 @@ import (
)
// Guesses the appropriate worker type based on the given source string
-func NewWorker(source string) (*types.Worker, error) {
+func NewWorker(source string, name string) (*types.Worker, error) {
u, err := url.Parse(source)
if err != nil {
return nil, err
}
- worker := types.NewWorker()
+ worker := types.NewWorker(name)
scheme := u.Scheme
if strings.ContainsRune(scheme, '+') {
scheme = scheme[:strings.IndexRune(scheme, '+')]