MCPcopy Create free account
hub / github.com/mhammond/pywin32 / ui_start_debugger_pump

Function ui_start_debugger_pump

Pythonwin/win32uimodule.cpp:1283–1303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281int bIsPumping = FALSE;
1282BOOL bDebuggerPumpStopRequested = FALSE;
1283static PyObject *
1284ui_start_debugger_pump(PyObject *self, PyObject *args)
1285{
1286 CHECK_NO_ARGS2(args,StartDebuggerPump);
1287 if (bIsPumping)
1288 RETURN_ERR("Error starting debugger pumper - already pumping");
1289 bIsPumping = TRUE;
1290 bDebuggerPumpStopRequested = FALSE;
1291 CProtectedWinThread *pThread = GetProtectedThread();
1292 if (!pThread) return NULL;
1293 GUI_BGN_SAVE;
1294 pThread->PumpMessages();
1295 if (!bDebuggerPumpStopRequested) // App shutdown request.
1296 PostQuitMessage(0);
1297 GUI_END_SAVE;
1298 RETURN_NONE;
1299 // @comm This function is used by the debugger. It allows the debugger to
1300 // interact with the user, even while the Python code is stopped.
1301 // As the Python code may be responding to a Windows Event, this function
1302 // works around the inherent message queue problems.
1303}
1304// @pymethod |win32ui|StopDebuggerPump|Stops the debugger pump. See <om win32ui.StartDebuggerPump>.
1305static PyObject *
1306ui_stop_debugger_pump(PyObject *self, PyObject *args)

Callers

nothing calls this directly

Calls 2

GetProtectedThreadFunction · 0.85
PumpMessagesMethod · 0.80

Tested by

no test coverage detected