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

Create new hello-threads exercise #106

Open
tboychuk opened this issue Sep 30, 2021 · 4 comments
Open

Create new hello-threads exercise #106

tboychuk opened this issue Sep 30, 2021 · 4 comments
Labels
java-fundamentals java fundamentals course

Comments

@tboychuk
Copy link
Contributor

The main goal of this exercise is to introduce threads and let people get their hands dirty with concurrent code. It should be an entry-level exercise that does not require previous experience with concurrency.

Location

  • create a new high-level module 7-0-java-concurrency
  • add 7-0-0-hello-theads exercise

Task

I guess it should be something like one class with a list of very simple methods. Each of those methods should require a person to implement a simple Thread-related logic. Here's a complete example

  • accept some logic as Runnable and return a new Thread based on it
  • accept a thread and start it
  • accept a thread and return its name
  • accept a thread and return its state
  • accept some logic, create a thread, start it and return it
  • accept working thread and wait for it to complete (join)
  • accept a thread and return its state
  • accept a list of tasks (Runnable) and return a list of threads that are in progress
  • accept a thread and make it sleep
@tboychuk tboychuk added the java-fundamentals java fundamentals course label Sep 30, 2021
@tboychuk tboychuk assigned ghost Sep 30, 2021
@shryhus shryhus added this to To do in Java Fundamentals Sep 30, 2021
@ghost ghost moved this from To do to In progress in Java Fundamentals Oct 2, 2021
@tboychuk
Copy link
Contributor Author

tboychuk commented Oct 5, 2021

@tkuzub it looks more or less fine. But it's not convenient to review commits in your repo.

  1. Please use this repo instead of your fork.
  2. Please create a PR (pull request) instead of just showing your commits.

In your case we are not sure about the exercise, so we need to iterate and discuss it. In order to show the idea, please create one PR: task + tests. I will try to do it myself and will leave you some comments in that PR. (Creating PR with completed solution is not required at this point)

So the next step is:

  • create a new branch in this repo
  • put your code there and create a PR

@ghost ghost moved this from In progress to Review in Java Fundamentals Oct 7, 2021
@ghost ghost moved this from Review to In progress in Java Fundamentals Oct 11, 2021
@tboychuk
Copy link
Contributor Author

@tkuzub I added another set of comments to your PR. Please let me know if everything is clear.

@ghost
Copy link

ghost commented Oct 15, 2021

Ok, before to end the day I will make the fix

@tboychuk tboychuk linked a pull request Oct 15, 2021 that will close this issue
@ghost ghost moved this from In progress to Review in Java Fundamentals Oct 15, 2021
@ghost ghost moved this from Review to In progress in Java Fundamentals Oct 15, 2021
@ghost ghost removed their assignment Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java-fundamentals java fundamentals course
Projects
Development

Successfully merging a pull request may close this issue.

1 participant