File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/test_primitives/test_reawaitable Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 4
4
from returns .primitives .reawaitable import ReAwaitable , reawaitable
5
5
6
6
7
- # Fix for issue with multiple awaits on the same ReAwaitable instance
8
- # causing race conditions: https://github.com/dry-python/returns/issues/2048
7
+ # Fix for issue with multiple awaits on the same ReAwaitable instance:
8
+ # https://github.com/dry-python/returns/issues/2108
9
9
async def sample_coro () -> str :
10
- """Sample coroutine for testing ."""
10
+ """Sample coroutine that simulates an async operation ."""
11
11
await anyio .sleep (1 ) # Increased from 0.1 to reduce chance of random failures
12
12
return 'done'
13
13
@@ -19,7 +19,7 @@ async def await_helper(awaitable_obj) -> str:
19
19
20
20
@pytest .mark .anyio
21
21
async def test_concurrent_awaitable () -> None :
22
- """Test that ReAwaitable works with concurrent awaits."""
22
+ """Test that ReAwaitable safely handles concurrent awaits using a lock ."""
23
23
test_target = ReAwaitable (sample_coro ())
24
24
25
25
async with anyio .create_task_group () as tg :
You can’t perform that action at this time.
0 commit comments