On Thursday, July 10, 2025 3:22:30 AM Mountain Daylight Time Bienlein via Digitalmars-d-learn wrote: > Hello, > > I'm looking for some kind of blocking queue for D, that is if the > queue is empty the thread doing a take on the queue is blocked > until an item has been added to the queue. Couldn't find anything > in the standard library.
std.concurrency's send / prioritySend and receive / receiveOnly / receiveTimeout can be used in such a fashion: https://dlang.org/phobos/std_concurrency.html#.send https://dlang.org/phobos/std_concurrency.html#.prioritySend https://dlang.org/phobos/std_concurrency.html#.receive https://dlang.org/phobos/std_concurrency.html#.receiveOnly https://dlang.org/phobos/std_concurrency.html#.receiveTimeout - Jonathan M Davis