Skip to content

Commit 2a1e923

Browse files
committed
Docstrings
1 parent 45b6c72 commit 2a1e923

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

async_substrate_interface/async_substrate.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,20 @@ async def __aenter__(self):
601601
return self
602602

603603
async def mark_waiting_for_response(self):
604+
"""
605+
Mark that a response is expected. This will cause the websocket to not automatically close.
606+
607+
Note: you must mark as response received once you have received the response.
608+
"""
604609
async with self._lock:
605610
self._waiting_for_response += 1
606611

607612
async def mark_response_received(self):
613+
"""
614+
Mark that the expected response has been received. Automatic shutdown of websocket will proceed normally.
615+
616+
Note: only do this if you have previously marked as waiting for response
617+
"""
608618
async with self._lock:
609619
self._waiting_for_response -= 1
610620

0 commit comments

Comments
 (0)