(self, creator)
| 1472 | # internal methods |
| 1473 | |
| 1474 | def _new_channel(self, creator): |
| 1475 | if creator.name == 'main': |
| 1476 | return _channels.create(REPLACE) |
| 1477 | else: |
| 1478 | ch = _channels.create(REPLACE) |
| 1479 | run_interp(creator.id, f""" |
| 1480 | import _interpreters |
| 1481 | cid = _xxsubchannels.create() |
| 1482 | # We purposefully send back an int to avoid tying the |
| 1483 | # channel to the other interpreter. |
| 1484 | _xxsubchannels.send({ch}, int(cid), blocking=False) |
| 1485 | del _interpreters |
| 1486 | """) |
| 1487 | self._cid = recv_nowait(ch) |
| 1488 | return self._cid |
| 1489 | |
| 1490 | def _get_interpreter(self, interp): |
| 1491 | if interp in ('same', 'interp'): |
no test coverage detected