Can I write functions that work as both suspendable and non-suspendable functions? My use case is a custom logging framework. Instead of having two separate interfaces, one with suuspendable and one without, functions, I would like to have one single interface that works on both. If the caller context is suspendable, then it uses suspendable functions. If not, it uses blocking ones.
I am working on a multiplatform project. I'd like this API to be part of
commonMain
.