Closed bes closed 5 years ago
@bes try
func doSomethingInBackground() -> Promise<Void> {
return Promise<Void>(on: bgQueue) {
fulfill, reject in
myMoc.perform {
fulfill(())
}
}
}
from Swift -> Misc: public typealias Void = ()
but I don't know why fulfill(Void)
don't work
@umbri Thanks, it worked! I tried fulfill(Void)
before, but as you said it does not seem to work. But fulfill(())
works.
Hi,
I can't figure out how to use fulfill with a
Promise<Void>
.fulfill(nil) doesn't work either.
What is your recommendation on how to initialize an async
Promise
which does not have a logical return value?