MCPcopy Create free account
hub / github.com/microsoft/debugpy / parent

Function parent

tests/debugpy/test_multiproc.py:61–87  ·  view source on GitHub ↗
(q, a)

Source from the content-addressed store, hash-verified

59 pass
60
61 def parent(q, a):
62 from debuggee import backchannel
63
64 debuggee.setup()
65
66 print("spawning child")
67 p = multiprocessing.Process(target=child, args=(q, a))
68 p.start()
69 print("child spawned")
70
71 q.put("foo?")
72 foo = a.get()
73 assert isinstance(foo, Foo), repr(foo)
74
75 q.put("child_pid?")
76 what, child_pid = a.get()
77 assert what == "child_pid"
78 backchannel.send(child_pid)
79
80 q.put("grandchild_pid?")
81 what, grandchild_pid = a.get()
82 assert what == "grandchild_pid"
83 backchannel.send(grandchild_pid)
84
85 assert backchannel.receive() == "continue"
86 q.put("exit!")
87 p.join()
88
89 def child(q, a):
90 print("entering child") # @bp

Callers 1

code_to_debugFunction · 0.85

Calls 12

reprFunction · 0.85
putMethod · 0.80
receiveMethod · 0.80
execlMethod · 0.80
startMethod · 0.45
getMethod · 0.45
sendMethod · 0.45
joinMethod · 0.45
copyMethod · 0.45
waitMethod · 0.45
closeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…