frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

C++ Coroutines Advanced: Converting std:future to asio:awaitable

https://www.ddhigh.com/en/2025/07/15/cpp-coroutine-future-to-awaitable/
41•xialeistudio•7h ago

Comments

xialeistudio•7h ago
In modern C++ development, coroutines have brought revolutionary changes to asynchronous programming. However, when using boost::asio or standalone asio, we often encounter scenarios where we need to convert traditional std::future<T> to asio::awaitable<T>. This article will detail an efficient, thread-safe conversion method.
userbinator•2h ago
Did you just copy-paste the first paragraph of the article.
vlovich123•2h ago
It's literally his article.
mgaunard•2h ago
So the solution is to have a thread waiting on the future. Technically you'd need a thread per future, which is not exactly scalable. The article uses a pool which has its own problems.

The article even mentions an arguably better approach (check on a timer), but for some reasons claims it is worse.

Those integrations are not exactly good designs regardless; simply don't use std::future is the solution, and use non-blocking async mechanisms that can cooperate on the same thread instead. Standard C++ has one albeit somewhat overcomplicated, senders and receivers. Asio also works.

flakes•2h ago
Seems prone to deadlocking- I would avoid making the thread-pool globally scoped, and instead provide it as arguments to the helper methods.
usrnm•1h ago
Every time I read an article like this I thank the day when I switched from C++ to go. I know why C++ is like this, I understand all the hard work that went into evolving it over 40 years, but I simply refuse to deal with all this stuff anymore. I have better things to worry about in my life.

LLM Inevitabilism

https://tomrenner.com/posts/llm-inevitabilism/
467•SwoopsFromAbove•4h ago•430 comments

Apple's MLX adding CUDA support

https://github.com/ml-explore/mlx/pull/1983
356•nsagent•11h ago•142 comments

LIGO detects most massive black hole merger to date

https://www.caltech.edu/about/news/ligo-detects-most-massive-black-hole-merger-to-date
258•Eduard•13h ago•128 comments

Kiro: A new agentic IDE

https://kiro.dev/blog/introducing-kiro/
826•QuinnyPig•18h ago•351 comments

Dog Walk: Blender Studio's official game project

https://blenderstudio.itch.io/dogwalk
225•doener•11h ago•32 comments

RFC: PHP license update

https://wiki.php.net/rfc/php_license_update
222•josephwegner•11h ago•54 comments

Clashes between web and X11 colors in the CSS color scheme

https://en.wikipedia.org/wiki/X11_color_names
52•mmoogle•1d ago•9 comments

VHS, VCDs, and Laserdiscs in Southeast Asia

https://rubenerd.com/vcds-and-laserdiscs-in-southeast-asia/
6•mikece•3d ago•0 comments

C++ Coroutines Advanced: Converting std:future to asio:awaitable

https://www.ddhigh.com/en/2025/07/15/cpp-coroutine-future-to-awaitable/
41•xialeistudio•7h ago•7 comments

Context Rot: How increasing input tokens impacts LLM performance

https://research.trychroma.com/context-rot
159•kellyhongsn•13h ago•32 comments

SQLite async connection pool for high-performance

https://github.com/slaily/aiosqlitepool
114•slaily•3d ago•39 comments

When Sigterm Does Nothing: A Postgres Mystery

https://clickhouse.com/blog/sigterm-postgres-mystery
20•saisrirampur•4h ago•3 comments

Show HN: Bedrock – An 8-bit computing system for running programs anywhere

https://benbridle.com/projects/bedrock.html
134•benbridle•4d ago•36 comments

Martin (YC S23) Is Hiring Founding Engineers to Build a Better Siri

https://www.ycombinator.com/companies/martin/jobs/
1•darweenist•4h ago

I Solved the Century-Old Mystery of a Miraculous Shipwreck Survivor

https://thewalrus.ca/empress-of-ireland-survivor-mystery/
66•Thevet•2d ago•20 comments

VMware Workstation: Bringing Virtualization to the x86 Architecture [pdf] (2012)

https://www.cse.iitb.ac.in/~mythili/virtcc/papers/vmware.pdf
8•todsacerdoti•1d ago•1 comments

NeuralOS: An operating system powered by neural networks

https://neural-os.com/
137•yuntian•13h ago•43 comments

Show HN: CallFS – S3-style object store in one Go binary (MIT)

https://github.com/ebogdum/callfs
63•ebogdum•5h ago•23 comments

DEWLine Museum – The Distant Early Warning Radar Line

https://dewlinemuseum.com/
51•reaperducer•10h ago•15 comments

Happy 20th Birthday, Django

https://www.djangoproject.com/weblog/2025/jul/13/happy-20th-birthday-django/
408•davepeck•1d ago•127 comments

Show HN: VS Code extension to edit the filesystem like a text buffer

https://github.com/ahrm/voil
22•hexomancer•2d ago•12 comments

Cognition (Devin AI) to Acquire Windsurf

https://cognition.ai/blog/windsurf
413•alazsengul•15h ago•323 comments

Replicube: 3D shader puzzle game, online demo

https://replicube.xyz/staging/
122•inktype•3d ago•20 comments

Building Modular Rails Applications: A Deep Dive into Rails Engines

https://www.panasiti.me/blog/modular-rails-applications-rails-engines-active-storage-dashboard/
154•giovapanasiti•17h ago•33 comments

Cache Benchmarks

https://github.com/tidwall/cache-benchmarks
19•jjwiseman•3d ago•4 comments

Strategies for Fast Lexers

https://xnacly.me/posts/2025/fast-lexer-strategies/
154•xnacly•18h ago•58 comments

East Asian aerosol cleanup has likely contributed to global warming

https://www.nature.com/articles/s43247-025-02527-3
200•defrost•23h ago•225 comments

The Collapse of the FDA

https://www.nytimes.com/2025/07/08/magazine/fda-collapse-rfk-kennedy.html
138•littlexsparkee•8h ago•78 comments

Embedding user-defined indexes in Apache Parquet

https://datafusion.apache.org/blog/2025/07/14/user-defined-parquet-indexes/
119•jasim•16h ago•16 comments

Japanese grandparents create life-size Totoro with bus stop for grandkids (2020)

https://mymodernmet.com/totoro-sculpture-bus-stop/
276•NaOH•17h ago•73 comments