Chapter Quiz: Real-Time Systems & Background Tasks

Mastery Assessment: Background & WebSockets

Complete this assessment with 100% score to master this chapter.

01When does a function added via `BackgroundTasks.add_task()` execute?

02What is the main advantage of WebSockets over standard HTTP for real-time apps?

03How do you handle a client disconnecting from a WebSocket in FastAPI?