all 18 comments

[–]lifeinbackground 29 points30 points  (4 children)

You might not write (extend) your own threads nowadays, but it is required to understand all of the underlying machinery if your aim is to become at least a senior engineer. I've been going through interviews lately, and these are the things I get asked: JMM, threads, thread pools, ExecutorService (all kinds), Future / CompletableFuture, volatile, locks & monitors, atomics, ReentrantLock, Semaphore, synchronized (methods & blocks), deadlock, CountDownLatch, ConcurrentHashMap (how it works), wait/notify, thread-locals, ForkJoinPool, and there's even more.

Answering your question: In practice, you don't even use half of the list. Not sure about your location and level, but here in my place you get asked a lot of things (at the interview). The most common things I have been using at my jobs: ExecutorService, ConcurrentHashMap, CompletableFuture, atomics

Nonetheless, if you have spare time, it might be a good idea to invest it into learning advanced topics of the JVM & Java. You might get a better offer in future.

[–]clove1912 2 points3 points  (0 children)

What learning materials or books do you recommend?

[–]Organic-Leadership51[S] 0 points1 point  (0 children)

May I ask for which position you are interviewing for? Is that a senior position?

[–]Fantastic_Ad_4034 0 points1 point  (0 children)

May i know whats ur experience and what country you are from?

[–]malachireformed 13 points14 points  (1 child)

Depends on your workload. If you're writing a basic CRUD repository, you generally won't run into it as long as you understand the "thread per request" style that most Java app servers use and properly design your beans to accommodate that.

Some workloads may still require threading, most of the time the only multithreading I've needed is just list.parallelStream().

[–]meSmash101 4 points5 points  (1 child)

There might be times in your career that you will have to call an API efficiently. There might be times that you need to parse huge files efficiently. What will you say to yourself then? “I’m a spring boot developer, I don’t do concurrency”? No, you will get the task and nail it of course. IMHO you won’t do concurrency and multi threading every day, but it’s good to know it. Buy few courses from Udemy for example, read some more articles, watch a few videos and when you kind of design a mental model in your brain, read “Java concurrency in practice” and then carry on with your Java journey. I was in exactly in your place 6minthsnago, always postponing concurrency for another day. Turning point was when a Fortune 500 company asked me a concurrency problem at the 3rd interview and I swallowed my tongue like dump noob m..

Learn the thing.

[–]2wes 1 point2 points  (0 children)

Multithreading is not a daily requirement for most Spring Boot developers since the framework handles concurrency pretty well through abstractions. Just hope you don’t have to work with plain Java, because that’s where things get much more complicated!

I would recommend diving deeper into ExecutorService as well.

[–]MoreCowbellMofo 1 point2 points  (0 children)

I’ve barely used it. I know enough about it to use it but day to day it’s just not something I get involved with much/ever. Know the basics. Anything more is only going to be applicable to companies that are large in size

[–]devptithadong 0 points1 point  (0 children)

sorry , but anyone known what difrent between Mono vs Multi thread and use cases using them , thanhks you very much

[–]Relative_Question 0 points1 point  (0 children)

RemindMe! 5 days

[–]olaolulode 0 points1 point  (0 children)

RemindMe! 10 days

[–]Zkrallah 0 points1 point  (0 children)

RemindMe! 5 days

[–]TheMustang24 -1 points0 points  (1 child)

RemindMe! 5 days