Support blocking apis
#12 attempted to introduce blocking support for this crate. Although that PR was closed, I'd like to open this issue to provide visibility for other users that want the same thing.
There are legitimate use cases for wanting to avoid async code. Although async is generally really nice, it introduces several footguns that beginner rust devs might not know about (async cancellation and blocking sandwich are the two biggest ones). While experienced rustaceans rarely hit these issues, the same is not true for other newer devs. These sorts of bugs come up *often* in code review, and I'm not 100% confident that I'll catch every one of them. Users should have the ability to choose whether or not they consume blocking or async apis.
In my case, we have an OTA update daemon that calls login1's `ScheduleShutdown`. We don't want to use async here because one of the design goals is for OTAs to be very robust and *never* break. So keeping the code as simple as possible and only using blocking apis is a legitimate design goal.
关闭于 2025-01-24 2 条评论