Skip to content
Closed
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lib/asyncio/windows_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import subprocess
import tempfile
import warnings
import uuid


__all__ = 'pipe', 'Popen', 'PIPE', 'PipeHandle'
Expand All @@ -31,9 +32,8 @@

def pipe(*, duplex=False, overlapped=(True, True), bufsize=BUFSIZE):
"""Like os.pipe() but with overlapped support and using handles not fds."""
address = tempfile.mktemp(
prefix=r'\\.\pipe\python-pipe-{:d}-{:d}-'.format(
os.getpid(), next(_mmap_counter)))
pipename = f'python-pipe-{os.getpid()}-{uuid.uuid4()}'
address = fr'\\.\pipe\{pipename}'

if duplex:
openmode = _winapi.PIPE_ACCESS_DUPLEX
Expand Down
Loading