# Compared to: proc setupClient(channels: ChannelHub): Thread[ChannelHub] = proc clientLoop(hub: ChannelHub) = adw.brew(gui(App(hub = hub))) createThread(result, clientLoop, channels) ## Main proc main() = let hub = new(ChannelHub[string, string]) let client = setupClient(hub) let server = setupServer(hub) joinThreads(server, client) hub.destroy() main()