GET /xrpc/app.bsky.actor.searchActorsTypeahead typeahead.waow.tech
16
fork

Configure Feed

Select the types of activity you want to include in your feed.

use threaded io instead of debug_io single-threaded default

std.Options.debug_io is backed by global_single_threaded which silently
serializes all mutex/sleep/network ops. override with Io.Threaded so
concurrent threads actually run concurrently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+9 -1
+9 -1
ingester/src/main.zig
··· 1 1 const std = @import("std"); 2 2 const mem = std.mem; 3 - const io = std.Options.debug_io; 4 3 const Allocator = mem.Allocator; 5 4 const zat = @import("zat"); 6 5 const logfire = @import("logfire"); ··· 11 10 const ingest = @import("ingest.zig"); 12 11 13 12 const log = std.log.scoped(.ingester); 13 + 14 + // override debug_io with a real threaded implementation so Io.Mutex, 15 + // io.sleep, and network ops work concurrently across threads. 16 + // without this, std.Options.debug_io uses global_single_threaded which 17 + // silently serializes all I/O. 18 + var app_threaded_io: std.Io.Threaded = undefined; 19 + pub const std_options_debug_threaded_io: ?*std.Io.Threaded = &app_threaded_io; 20 + const io = std.Options.debug_io; 14 21 15 22 const SOCKET_TIMEOUT_SECS = 5; 16 23 ··· 66 73 67 74 pub fn main() !void { 68 75 const allocator = std.heap.smp_allocator; 76 + app_threaded_io = std.Io.Threaded.init(allocator, .{}); 69 77 70 78 // configure logfire (reads LOGFIRE_WRITE_TOKEN from env) 71 79 _ = logfire.configure(.{