Wraps a suspend function with a callback, allowing for safe, asynchronous handling of results or exceptions in a coroutine.