Closed natsukagami closed 8 months ago
Cool, But I have a question,it will cause some inconvenient when user use gear's Future
and the current Future
in Scala's stdlib? What's the plan for this?
Cool, But I have a question,it will cause some inconvenient when user use gear's
Future
and the currentFuture
in Scala's stdlib? What's the plan for this?
@He-Pin You can probably easily convert a Scala stdlib Future into a gears Future. Going the other way shouldn't be too difficult but I will have to look into it.
I have a slight personal preference for resolved/rejected because the participle indicates grammatically that an action from the lifecycle of a Future (to complete) is already taken. Either way, it's a nice thing to have.
Might also be thinking about naming here:
Future.resolved(T)
,Future.rejected(Exception)
andFuture.completed == Future.now
to be consistent withFuture.withResolver
Future.success(T)
andFuture.failure(Exception)
to be fully similar toFuture.now(Success(T))
andFuture.now(Failure(Exception))
.