{
  "id": "python/asyncio-sleep-interrupt",
  "signature": "asyncio.exceptions.CancelledError: sleep interrupted",
  "signature_zh": "asyncio异常：睡眠被中断",
  "regex": "asyncio\\.exceptions\\.CancelledError:\\ sleep\\ interrupted",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A task is cancelled during asyncio.sleep(), which is a common cancellation point.",
  "root_cause_type": "generic",
  "root_cause_zh": "在asyncio.sleep()期间任务被取消，这是一个常见的取消点。",
  "versions": [
    {
      "version": "3.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Blocks the event loop and defeats the purpose of asyncio.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "May lead to resource leaks and inconsistent state.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "try: await asyncio.sleep(10) except asyncio.CancelledError: raise",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.8,
      "how": "await asyncio.shield(asyncio.sleep(10))",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-05-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}