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

Lab 8 Level 4 #582

Open
frisciliasultan opened this issue Nov 30, 2020 · 2 comments
Open

Lab 8 Level 4 #582

frisciliasultan opened this issue Nov 30, 2020 · 2 comments
Labels
🖱️ Java General Questions with regards to Java or its API

Comments

@frisciliasultan
Copy link

Description

Describe the question
I don't understand why my main is still taking 20-30s, even though I join() outside the while loop. Does anyone know what is wrong with my code? Any help would be greatly appreciated!
Screenshot 2020-11-30 at 10 31 27 PM

@frisciliasultan frisciliasultan added the 🖱️ Java General Questions with regards to Java or its API label Nov 30, 2020
@jiayi-lim
Copy link

I think there is no need to make cf using the supplyAsync and thenCombine. You can just make a cf when you run BusSg.findBusServicesBetween(srcId, searchString).

@frisciliasultan
Copy link
Author

Sorry, I'm still a bit lost. If I make cf inside the while loop, how do i collect them so that I can call the join?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖱️ Java General Questions with regards to Java or its API
Projects
None yet
Development

No branches or pull requests

2 participants