Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A timeout expires while awaiting a spawn_blocking task that has started. What can the caller safely conclude?" on CodeWiki (https://codewiki.com/practice/mcq/backend/rust-backend/blocking-timeout-semantics/).
Context (verbatim from the page):
"""
A timeout expires while awaiting a spawn_blocking task that has started. What can the caller safely conclude?
Only that the wait exceeded its deadline; the blocking closure may still finish.
The closure was stopped before its next machine instruction.
Any database transaction started by the closure was rolled back.
Dropping the JoinHandle waits for the closure in the background.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Backend. Where you are unsure, say so.