🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Threads, Processes and the GIL: all 10 questions

Quiz: Threads, Processes and the GIL · Question 2 of 10

A program downloads 100 web pages. Which tool gives the easiest big speed-up?

A program downloads 100 web pages. Which tool gives the easiest big speed-up?

  1. A.ThreadPoolExecutor, because the threads spend most of their time waiting
  2. B.Nothing helps because of the GIL
  3. C.ProcessPoolExecutor, because only processes can run at the same time
  4. D.A single for loop is already the fastest
Answer & explanation

Correct answer: ThreadPoolExecutor, because the threads spend most of their time waiting

Downloading is I/O-bound; a waiting thread releases the GIL so others can work.

Can you get the rest right without peeking?

Take the timed Quiz: Threads, Processes and the GIL quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →