{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Create a non-current tornado "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "IOLoop"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for an ipykernel service thread."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "ipykernel runs its service channels -- control, IOPub, the shell channel and subshells -- on dedicated event loops in background threads. The process-wide asyncio loop on Windows is a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ProactorEventLoop"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (so the main user-code loop can spawn asyncio subprocesses, see #1468/#1469), and Proactor has no native "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "add_reader"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". Tornado therefore drives a Proactor loop's zmq sockets through a helper \"Tornado selector\" thread. When a debugger suspends every thread at a breakpoint on Python >= 3.12 ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "sys.monitoring"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "), that un-exempt helper thread freezes mid-wake and deadlocks the control/debug read path (#1469)."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "These service loops never need Proactor's subprocess support, so we keep them on a "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "SelectorEventLoop"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ": it implements "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "add_reader"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " natively and needs no helper thread. Only the main/user-code loop stays on Proactor. On non-Windows platforms the default loop is already selector-based, so this is a no-op there."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/ipykernel/thread.py",
  "item_line": 13,
  "item_type": "function",
  "aliases": [
    "ipykernel.iostream.make_selector_io_loop"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [],
    "return_annotation": "IOLoop",
    "target_name": "make_selector_io_loop"
  },
  "references": null,
  "qa": "ipykernel.thread:make_selector_io_loop",
  "arbitrary": [],
  "local_refs": []
}