Return (recv, send) for a new cross-interpreter channel. The channel may be used to pass data safely between interpreters. "unbounditems" sets the default for the send end of the channel. See SendChannel.send() for supported values. The default value is UNBOUND, which replaces the
(*, unbounditems=UNBOUND)
| 45 | |
| 46 | |
| 47 | def create(*, unbounditems=UNBOUND): |
| 48 | """Return (recv, send) for a new cross-interpreter channel. |
| 49 | |
| 50 | The channel may be used to pass data safely between interpreters. |
| 51 | |
| 52 | "unbounditems" sets the default for the send end of the channel. |
| 53 | See SendChannel.send() for supported values. The default value |
| 54 | is UNBOUND, which replaces the unbound item when received. |
| 55 | """ |
| 56 | unbound = _serialize_unbound(unbounditems) |
| 57 | unboundop, = unbound |
| 58 | cid = _channels.create(unboundop, -1) |
| 59 | recv, send = RecvChannel(cid), SendChannel(cid) |
| 60 | send._set_unbound(unboundop, unbounditems) |
| 61 | return recv, send |
| 62 | |
| 63 | |
| 64 | def list_all(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…