Commits

Armin Rigo committed da192ff

Fix _multiprocessing.

Comments (0)

Files changed (2)

pypy/module/_multiprocessing/interp_connection.py

         self.flags = flags
         self.buffer = lltype.malloc(rffi.CCHARP.TO, self.BUFFER_SIZE,
                                     flavor='raw')
+        self.register_finalizer()
 
-    def __del__(self):
+    def invoke_finalizer(self):
         lltype.free(self.buffer, flavor='raw')
         try:
             self.do_close()

pypy/module/_multiprocessing/interp_semaphore.py

         self.kind = kind
         self.count = 0
         self.maxvalue = maxvalue
+        self.register_finalizer()
 
     def kind_get(self, space):
         return space.newint(self.kind)
     def exit(self, space, __args__):
         self.release(space)
 
-    def __del__(self):
+    def invoke_finalizer(self):
         delete_semaphore(self.handle)
 
 @unwrap_spec(kind=int, value=int, maxvalue=int)