0 day streak
Anonymous · shared experience20 Jun 2026 · 13 views

Walmart Global Tech: Build a thread pool executor modelled on the JDK internals

Interview question #Walmart Global Tech SDE 3 / Senior Low-level design

Problem. Design a thread pool executor that works the way Java's built-in one does internally. Present a class diagram, how the classes relate, and their key fields and methods.

Expected coverage.

  • A worker class that wraps a thread and repeatedly pulls tasks
  • A blocking queue that holds submitted Runnable tasks
  • Core pool size vs maximum pool size, plus a keep-alive time for idle extra threads
  • Thread reuse and the worker thread lifecycle
  • The path from task submission to execution
  • Rejection policies once the queue and pool are both full
  • Graceful shutdown

What the interviewer probed. Concurrency correctness: where race conditions can appear and which synchronization approach prevents them. They also asked for SOLID principles and design patterns, each with an example. The candidate said the round expected a real understanding of internal behaviour, not just familiarity with the API.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.