frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: How to learn concurrency?

30•shivajikobardan•12h ago
Race condition, producer consumer, and cool stuffs like that? I do java

Comments

scorpioxy•11h ago
That's a huge topic but I would say implement a hobby project and learn by doing. Pick something you're interested in and start writing code to exercise the theoretical concepts.

A small piece of advice is to make sure you're motivated before diving in. Debugging a race condition, just as an example, can be quite involved and consume a lot of your time and energy to even reproduce.

ykonstant•8h ago
But what is a good hobby project with a strong focus on concurrency that will not swamp a beginner to this topic?
peauc•8h ago
I started by writing a user interface that handled they keyboard events in a thread and communicated to the main thread using a message queue. IMO that's a good easy first step :)
sigmaprimus•11h ago
Brilliant.org?
Rendello•11h ago
Everything I know is from desperately trying to parallelize my TIS-100 solutions.
serendipty01•11h ago
https://deadlockempire.github.io/

https://thecomputersciencebook.com/book/concurrent-programmi...

pestatije•10h ago
https://docs.oracle.com/en/java/javase/25/core/concurrency.h...
Pooge•10h ago
Java Concurrency in Practice[1] has always been recommended by my colleagues. I'm about halfway through it and I think it makes the concepts pretty clear. Even if you move away from Java one day, I think the investment is not lost at all. Then you could ask your favorite LLM to create concurrency exercises once in a while to practice.

[1]: ISBN 978-0321349606

propablythrown•9h ago
Start by learning how to use a search engine?
netsharc•5h ago
Or an LLM... Curious how this stackoverflow-first-grader question isn't flagged to death.
propablythrown•5h ago
People in the comments wish to provide assistance and share their experience, clearly missing the fact that the person asking didn't even bother to do a simple search first.
throwaway81523•9h ago
Read a book about OS's I guess. This should be good, an update of an earlier good book: https://www.os-book.com/OS10/

There was a Java-specific edition: https://www.os-book.com/OS8/os8j/index.html

liampulles•7h ago
Something I've built for myself (in Go) that has been extremely useful is a lib to read a CSV that delegates to n concurrent workers.

Maybe that is a good side project.

rramadass•7h ago
1) Foundations of Multithreaded, Parallel, and Distributed Programming by Gregory Andrews - https://www2.cs.arizona.edu/~greg/mpdbook/ This will give you a solid foundation in all aspects of concurrency.

2) The Art of Multiprocessor Programming by Herlihy, Shavit et al. - https://shop.elsevier.com/books/the-art-of-multiprocessor-pr... The classic must-study book.

Both the above are not language specific but do have examples in Java.

ashed96•5h ago
Once you've gone through the learning resources others shared, LeetCode has a dedicated concurrency section for hands-on practice: https://leetcode.com/problemset/concurrency/

(I actually authored a few of those problems - they cover the classic scenarios like producer-consumer, dining philosophers, etc.)

another_twist•5h ago
Docs of java.util.concurrent would be my suggestion. And go straight into the wild and try to build a system that solves the billion rows challenge. You might want to truncate the input and start with a million row challenge first.

The cool stuff in concurrency is not having to deal with it imoand recognizing when its not essential. Also I hope you mean concurrency not parallelism. The second one is a bit more manageable.

notorious_pgb•2h ago
Do you know, deep down, what a thread is? What it actually is?

If not, I suggest reading this blog post: https://prettygoodblog.com/p/what-threads-are-part-2

(disclaimer: I wrote this)

luhego•1h ago
If you don’t mind learning another language. I have found Learn Concurrent Programming with Go by James Cutajar to be a very practical book. It includes memory sharing and message passing approaches with plenty of examples. It also explains concepts like mutual exclusion, deadlock-free and starvation-free properties and others. For Java, you can try The Art of Multiprocessor Programming Second Edition. It includes examples in Java but it is more theoretical and it includes a lot of proofs, specially the first half. The second half is more approachable.

Ask HN: What's your solution to tech addiction?

3•asim•2h ago•6 comments

Ask HN: Is Computer Science still a good choice?

4•speedylight•2h ago•6 comments

Ask HN: What Are You Working On? (Nov 2025)

454•david927•4d ago•1322 comments

Ask HN: How common is banning Docker?

8•martypitt•5h ago•10 comments

Ask HN: How to learn concurrency?

30•shivajikobardan•12h ago•18 comments

Ask HN: Looking for a good course to learn proof assistant Lean 4

4•rabarbers•7h ago•0 comments

Ask HN: What metrics do you track in a Conversational Agent?

4•shubhamintech•7h ago•0 comments

Starting Debugging Session from CLI

2•regular8901•10h ago•0 comments

Ask HN: How does one stay motivated to grind through LeetCode?

84•blutoot•2d ago•99 comments

Ask HN: Could Microsoft replace its CEO with ChatGPT?

23•nothrowaways•1d ago•34 comments

Ask HN: How would you set up a child’s first Linux computer?

220•evolve2k•5d ago•295 comments

Ask HN: Senior people, how did your career evolve?

80•Seb-C•3d ago•50 comments

Ask HN: What do you do while LLM is writing code

7•me551ah•1d ago•13 comments

Tell HN: PSA/reminder AI Apps have access to your clipboard

6•ddxv•1d ago•1 comments

Tell HN: X is opening any tweet link in a webview whether you press it or not

647•stillatit•1w ago•519 comments

Ask HN: What open source LLM agent do you guys use and why?

6•_345•1d ago•2 comments

Ask HN: My family business runs on a 1993-era text-based-UI (TUI). Anybody else?

315•urnicus•1w ago•308 comments

Ask HN: Who is hiring? (November 2025)

400•whoishiring•1w ago•579 comments

Ask HN: How do you get over the fear of sharing code?

74•sodokuwizard•5d ago•90 comments

Ask HN: Effective way to deal with mosquitoes?

19•simonebrunozzi•2d ago•34 comments

The PUMP.NETWORK experiment: using gambling to calculate trust

5•nthglsn•1d ago•0 comments

Ask HN: Who wants to be hired? (November 2025)

198•whoishiring•1w ago•476 comments

You've reached the end!