bluesky / ophyd-async

Hardware abstraction for bluesky written using asyncio
https://blueskyproject.io/ophyd-async
BSD 3-Clause "New" or "Revised" License
11 stars 26 forks source link

An idea... #642

Closed coretl closed 1 week ago

coretl commented 2 weeks ago

In https://github.com/bluesky/ophyd-async/pull/641 we make connect in mock mode sync rather than async, but can't complete the job because Device.connect is async so child connects must also be async. This PR make connect return an optional Task which means we can make the mock path fully sync.

Too magic?

Also, tests need fixing...

callumforrester commented 1 week ago

Mocking is always magic anyway so the magic does not bother me

coretl commented 1 week ago

I think the gains are marginal, so let's abandon this idea