MCPcopy Index your code
hub / github.com/python/cpython / _UpperCaser

Class _UpperCaser

Lib/test/_test_multiprocessing.py:1062–1082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060#
1061
1062class _UpperCaser(multiprocessing.Process):
1063
1064 def __init__(self):
1065 multiprocessing.Process.__init__(self)
1066 self.child_conn, self.parent_conn = multiprocessing.Pipe()
1067
1068 def run(self):
1069 self.parent_conn.close()
1070 for s in iter(self.child_conn.recv, None):
1071 self.child_conn.send(s.upper())
1072 self.child_conn.close()
1073
1074 def submit(self, s):
1075 assert type(s) is str
1076 self.parent_conn.send(s)
1077 return self.parent_conn.recv()
1078
1079 def stop(self):
1080 self.parent_conn.send(None)
1081 self.parent_conn.close()
1082 self.child_conn.close()
1083
1084class _TestSubclassingProcess(BaseTestCase):
1085

Callers 1

test_subclassingMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_subclassingMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…