Question 5 of 5

What does a semaphore limit when calling a model?

Three instruction queries arrive at once. The application can wait for only two replies at a time. One request will fail.

Five people click Translate and the app allows two translations at a time. Two texts are being processed and three are waiting. Each time one translation finishes, the next text takes its place. How many finish in a minute also depends on how long each translation takes.

WHERE TO START

Imagine the service accepts two requests at once. Where will the others wait?

What to know before this question
Topic example · Response status

Change 200 to 404. What will the program print?

status = 200
print(status == 200)
Line notes
  1. Store a service response code.
  2. Compare the code with 200 and print the result.

How would you rate your understanding?

This is your self-assessment. Progress is saved in this browser.

Not rated yet

← Back to Python and APIs