Like `.connect`, but the callback is kept when pickling/unpickling. Currently internal-use only.
(self, signal, func)
| 310 | return cid |
| 311 | |
| 312 | def _connect_picklable(self, signal, func): |
| 313 | """ |
| 314 | Like `.connect`, but the callback is kept when pickling/unpickling. |
| 315 | |
| 316 | Currently internal-use only. |
| 317 | """ |
| 318 | cid = self.connect(signal, func) |
| 319 | self._pickled_cids.add(cid) |
| 320 | return cid |
| 321 | |
| 322 | # Keep a reference to sys.is_finalizing, as sys may have been cleared out |
| 323 | # at that point. |