3 ms·
> Now that it's only using one thread, it deadlocks, because the consumer is waiting to get something from the queue, and the producer is scheduled to run, but
by geon 1y ago
> Now that it's only using one thread, it deadlocks, because the consumer is waiting to get something from the queue, and the producer is scheduled to run, but it has not run yet.
Is the reason that the queue has a zero buffer size (always "full"), so that the consumer must consume the `flavor_text` before the producer can return?
Queue source:
> /// When buffer is full, producers suspend and are resumed by consumers.
https://github.com/ziglang/zig/blob/master/lib/std/Io.zig#L1465C1-L1465C73 https://github.com/ziglang/zig/blob/master/lib/std/Io.zig#L1...