Skip to content

Commit

Permalink
restore full main()
Browse files Browse the repository at this point in the history
  • Loading branch information
donpdonp committed Jul 13, 2024
1 parent b41a0a8 commit 56b8bf7
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ pub fn main() !void {
if (config.readfile(config.config_file_path())) |config_data| {
settings = config_data;
const dummy_payload = alloc.create(thread.CommandVerb) catch unreachable;
_ = try thread.create("gui", gui.go, dummy_payload, guiback);
//_ = thread.create("heartbeat", heartbeat.go, dummy_payload, heartback) catch unreachable;

// while (true) {
// statewalk(alloc);
// util.log("thread.wait()/epoll", .{});
// thread.wait(); // main ipc listener
// }
} else |_| {
//log.err("config error: {!}\n", .{err});
_ = thread.create("gui", gui.go, dummy_payload, guiback) catch unreachable;
_ = thread.create("heartbeat", heartbeat.go, dummy_payload, heartback) catch unreachable;
while (true) {
statewalk(alloc);
util.log("thread.wait()/epoll", .{});
thread.wait(); // main ipc listener
}
} else |err| {
log.err("config error: {!}\n", .{err});
}
}

Expand Down

0 comments on commit 56b8bf7

Please sign in to comment.