Skip to content

Conversation

@julianstirling
Copy link
Contributor

In the OpenFlexure Microscope Server cameras make used portal.call() to provide a blocking way to call async code. This provides that same interface by adding thing_server_interface.call_async_task.

@barecheck
Copy link

barecheck bot commented Dec 14, 2025

Barecheck - Code coverage report

Total: 95.07%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link
Collaborator

@rwb27 rwb27 left a comment

Choose a reason for hiding this comment

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

I should familiarise myself with why this is done in the OFM camera - I thought all the necessary async code was wrapped up on the JPEG streams - but this looks very uncontroversial.

I've suggested a warning that it can deadlock the event loop if it's called there. Should be obvious, but probably worth being explicit...

@julianstirling julianstirling merged commit 05b2a8e into main Dec 14, 2025
14 checks passed
@julianstirling julianstirling deleted the call_async_task branch December 14, 2025 19:35
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