Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty (p/promise) just returns nil #61

Open
mpenet opened this Issue Mar 6, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@mpenet
Copy link

mpenet commented Mar 6, 2019

Looking at https://github.com/funcool/promesa/blob/master/src/promesa/impl.cljc#L183 it seems that the :clj branch just returns nothing. I guess you meat it to return something like (java.util.concurrent.CompletableFuture.) ?

@mpenet mpenet changed the title empty (p/promise) just returns nil? empty (p/promise) just returns nil Mar 6, 2019

@niwinz niwinz self-assigned this Mar 8, 2019

@niwinz niwinz added the bug label Mar 8, 2019

@niwinz

This comment has been minimized.

Copy link
Member

niwinz commented Mar 8, 2019

Seems like a bug.

@mpenet

This comment has been minimized.

Copy link
Author

mpenet commented Mar 8, 2019

You prolly need to add all of the operations support too:
ex:

(extend-protocol pt/ICompletable
  java.util.concurrent.CompletableFuture
  (-resolve [f v] (.complete f v))
  (-reject [f v] (.completeExceptionally f v)))

And the same for cancelable & co I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.