We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*wait_for_value*
After discussions surrounding #453 and #447 I suggest we make the following changes to the following helpers for signal operations:
status
set_and_wait_for_*value
timeout
status_timeout
arm_status = await set_and_wait_for_value(self.acquire, True) ... await arm_status
to
arm_status = self.acquire.set(True) await wait_for_value(self.acquire, True) ... await arm_status
match
set_and_wait_for_value
set_and_wait_for_other_value
That would make the interface:
async def observe_value( signal: SignalR[T], timeout: float | None = None, done_status: Status | None = None) -> AsyncGenerator[T, None]: ... @override async def observe_signals_value(signal1: SignalR[T], signalR[T2]) -> AsyncGenerator[Tuple[SignalR[T], T] | Tuple[SignalR[T2], T2]]: # expand this for all combinations like asyncio.gather type stub does ... async def observe_signals_value( *signals: SignalR[T], timeout: float | None = None, done_status: Status | None = None) -> AsyncGenerator[Tuple[SignalR[T], T], None]: ... async def wait_for_value( signal: SignalR[T], match_value: T | Callable[[T], bool], timeout: Optional[float] = DEFAULT_TIMEOUT) -> None: ... async def set_and_wait_for_value( signal: SignalRW[T], value: T, match_value: T | Callable[[T], bool] | None = None, timeout: Optional[float] = DEFAULT_TIMEOUT) -> None: ... async def set_and_wait_for_other_value( signal: SignalW[T], value: T, match_signal: SignalR[S], match_value: S | Callable[[S], bool], timeout: Optional[float] = DEFAULT_TIMEOUT) -> None: ...
The text was updated successfully, but these errors were encountered:
And also #402
Sorry, something went wrong.
ZohebShaikh
Successfully merging a pull request may close this issue.
After discussions surrounding #453 and #447 I suggest we make the following changes to the following helpers for signal operations:
status
fromset_and_wait_for_*value
and instead await it, usingtimeout
for it rather than a separatestatus_timeout
to
match
function inset_and_wait_for_value
andset_and_wait_for_other_value
That would make the interface:
The text was updated successfully, but these errors were encountered: