Skip to content

Commit

Permalink
added docstrings wrt select_for_win() in process.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
3bisuoka committed Jun 3, 2024
1 parent c976a25 commit 89ac996
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions aiaccel/util/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@
import sys
import threading
import time
from typing import IO

from aiaccel.common import datetime_format


def select_for_win(
rlist: list[subprocess.Popen[bytes], subprocess.Popen[bytes]],
timeout: float = 1.0
rlist: list[IO[bytes], IO[bytes]],
timeout: int = 1
) -> tuple[list, list]:
"""Alternative to select.select() on Windows.
Args:
rlist (list): A list of IO objects. It waits until ready for reading.
timeout (int): An integer specifies a time-out in seconds.
Returns:
tuple[list, list]: A tuple consisting a list of readable objects
and Exceptions.
"""
start_time = time.time()
readable, errorlist = [], []

Expand Down

0 comments on commit 89ac996

Please sign in to comment.