IO thread has more state setup

This commit is contained in:
Mitchell Hashimoto
2022-11-03 15:07:51 -07:00
parent 35c1decd58
commit 9b3d22e55e
5 changed files with 189 additions and 7 deletions

View File

@@ -113,8 +113,9 @@ pub fn threadMain(self: *Thread) void {
fn threadMain_(self: *Thread) !void {
// Run our thread start/end callbacks. This allows the implementation
// to hook into the event loop as needed.
try self.impl.threadEnter(self.loop);
defer self.impl.threadExit();
var data = try self.impl.threadEnter(self.loop);
defer data.deinit();
defer self.impl.threadExit(data);
// Set up our async handler to support rendering
self.wakeup.setData(self);