Skip to content

multiqueue_modification#90

Open
easyasme wants to merge 3 commits intomainfrom
multiqueue_modification
Open

multiqueue_modification#90
easyasme wants to merge 3 commits intomainfrom
multiqueue_modification

Conversation

@easyasme
Copy link
Copy Markdown
Contributor

No description provided.

await wrapper.__aexit__(exc_type, exc_val, exc_tb)
# Exit all queues properly - suspended
for ident, wrapper in list(self.queues.items()):
await wrapper.__aexit__(asyncio.CancelledError, asyncio.CancelledError(SUSPENDED), None)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

keep exc_type etc.

Comment on lines +153 to +161
# If identity is still active, cancel and clean up
if ident in self.ident_to_task:
task = self.ident_to_task[ident]
del self.ident_to_task[ident]
del self.task_to_ident[task]
task.cancel()

# Call __aexit__ on the corresponding queue wrapper
wrapper = self.queues.pop(ident, None)
if wrapper:
await wrapper.__aexit__(None, None, None)
wrapper = self.queues.pop(ident)
await wrapper.__aexit__(asyncio.CancelledError, asyncio.CancelledError(SUSPENDED), None)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if ident not in self.ident_to_task:
  raise Exception()
await wrapper.__aexit__(None, None, None)

Comment on lines +317 to +320
# Both p1 and p2 have a chat
assert ('chat', 'p1') in await find_historian().get_resources('p1')
assert ('chat', 'p2') in await find_historian().get_resources('p2')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

pull out and use events.

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.

2 participants