core: synchronize global .init before first .tick

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-04-16 20:48:04 -07:00
parent 2c73f8c518
commit 4ba8addb3c
2 changed files with 8 additions and 0 deletions

View file

@ -16,6 +16,7 @@ pub const global_events = .{
pub const local_events = .{
.init = .{ .handler = init },
.init_done = .{ .handler = fn () void },
// TODO(important): need some way to tie event execution to a specific thread once we have a
// multithreaded dispatch implementation
@ -45,6 +46,7 @@ fn init(core: *Mod) !void {
});
core.sendGlobal(.init, .{});
core.send(.init_done, .{});
}
fn deinit(core: *Mod) void {