-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Anything that fetch
es something will now block the thread, because I use ureq
. We could switch to something like hyper
(which btw we're probably depending on pretty soon, anyway #192).
However, introducing async stuff into Atomic-Server warrants at least some more discussion. In issue #12 I basically concluded that we didn't need async, and that it might hurt performance. Async has overhead - that's unavoidable. I'm not sure how bad it is, though.
Also, note that we already have a little bit of async in atomic_lib, in a plugin handler for email
.
What happens if we make fetch async
get_resouce
will becomeasync
- this is used practically everywhere, so now pretty much everything will become async.
If async
is everywhere, is that a problem? I've read that rust devs find async pretty hard, so that means it might become harder to use atomic_lib
.
Anyways, I believe async
can't be used in traits right now, but this is probably changing soon, as it's already in nightly since november 2022.