BDB(3pm)
π BDB π
okay bestie, sit DOWN, because this is Coro::BDB β truly asynchronous bdb access β¨ and honestly? it's giving main character energy for your event loop π
β¨ NAME β¨
Coro::BDB β truly asynchronous bdb access π
no cap, that's the whole vibe: it makes your bdb stuff actually async instead of just sitting there blocking everyone.
πΈ SYNOPSIS πΈ
use Coro::BDB;
use BDB;
# can now use any of the bdb requests
that's it, that's the whole ritual π«Ά load Coro::BDB, load BDB, and boom β you can now use any of the bdb requests. iconic.
π¦ DESCRIPTION π¦
First thing's first, bestie: this module is an AnyEvent user, which means you need to make sure that you use and run a supported event loop. no event loop, no vibes. periodt.
So here's the tea β β this module is a thin wrapper around the BDB module. And the problem it solves is so real: every BDB request that could block and doesn't get passed a callback would, normally, block ALL your coroutines π like the whole group chat just going silent. after you load this module? that is no longer the case β it provides a suitable sync prepare callback and everyone keeps flowing. slay.
It will also register an AnyEvent watcher as soon as AnyEvent chooses an event loop π
heads up: the AnyEvent watcher can be disabled by executing undef $Coro::BDB::WATCHER. and if you do that β please notify the author of when and why you think this was necessary. they wanna know, fr fr.
One more thing: this module does not export anything (unlike Coro::AIO), because BDB already supports leaving out the callback. which is convenient, ngl. (Unfortunately, it ties a C context to each coroutine executing such a callback, so in the future, it might export more efficient wrappers). lowkey excited for that glow-up π₯
π SEE ALSO π
BDB of course. π like, obviously, bestie. the way that it's literally the whole point iykyk π¦
π AUTHOR/SUPPORT/CONTACT π
Marc A. Lehmann <schmorp@schmorp.de>
http://software.schmorp.de/pkg/Coro.html
and that's the page, babe π this was perl v5.40.1, dated 2025-03-21, and the manual you just read is BDB(3pm) β¨ go forth and be asynchronous π
πΈπ
π¦ where this page comes from
- debian trixie: libcoro-perl 6.570-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcoro-perl 6.570-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms