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

1920 Special Sem1 Q9 Asychronous Programming #372

Open
ziyuanqin opened this issue Apr 26, 2021 · 3 comments
Open

1920 Special Sem1 Q9 Asychronous Programming #372

ziyuanqin opened this issue Apr 26, 2021 · 3 comments
Labels
🧠 Finals Q&A Questions related to Finals

Comments

@ziyuanqin
Copy link

I am not sure about how to do this question. Are we supposed to covert both u and p to completable future?
屏幕截图(52)

@ziyuanqin ziyuanqin added the 🧠 Finals Q&A Questions related to Finals label Apr 26, 2021
@Brandon-Chiu
Copy link

I converted both u & p to CompletableFuture as usernameExists and isValidPassword could take a long time to run which might be the issue here.
Do take note that as the question wants us to return an object of type CompletableFuture, all the return statements need to be edited such that a CompletableFuture object is returned instead.

@somenobody98
Copy link

Hi, there is more discussion at #298!

@lohwenxin
Copy link

Hello! This was my code for this part, but I am not 100% sure if it is right or not. The part where u and p is placed into CompletableFuture should be right I think.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧠 Finals Q&A Questions related to Finals
Projects
None yet
Development

No branches or pull requests

4 participants