Skip to content

Conversation

@yuce
Copy link
Contributor

@yuce yuce commented Nov 17, 2025

No description provided.

@yuce yuce changed the title [DON'T MERGE] Ported more tests [4/6] Ported more tests [4/6] Dec 3, 2025
@yuce yuce changed the title Ported more tests [4/6] Asyncio Module Ported more tests [4/6] Dec 4, 2025
@gbarnett-hz gbarnett-hz self-requested a review December 4, 2025 11:00
return await self._context.proxy_manager.destroy_proxy(self.service_name, self.name)
async with asyncio.TaskGroup() as tg: # type: ignore[attr-defined]
tg.create_task(self._on_destroy())
return await tg.create_task(
Copy link

@gbarnett-hz gbarnett-hz Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use simpler (really need concurrency here?):

await self._on_destroy()
return await self._conftext...

Reads a little odd with the return there -- is that even safe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's safe, the task group will not exit without all tasks are completed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks odd to me to have the return there, the following seems clearer IMO as it doesn't mix the task group completion semantics with some nested return.

async with asyncio.TaskGroup() as tg:  # type: ignore[attr-defined]
            tg.create_task(self._on_destroy())
            t = await tg.create_task(...)
return t.result()

yuce added 2 commits December 4, 2025 15:18
# Conflicts:
#	hazelcast/internal/asyncio_connection.py
#	hazelcast/internal/asyncio_reactor.py
@yuce yuce merged commit bbd5a21 into hazelcast:master Dec 4, 2025
11 checks passed
@yuce yuce deleted the asyncio-module-integration-tests2 branch December 4, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants