Skip to content

Conversation

tronical
Copy link
Member

@tronical tronical commented Sep 9, 2025

The API is minimal at this point: slint.run_event_loop() takes an
optional coroutine parameter, that's run. As the loop is run, an
asyncio event loop (as per asyncio.get_event_loop()) is active, which
maps socket operations to smol's Async adapter and polls them within the
Slint event loop.

cc #4137

TODO:

  • Support re-running the loop within the same process multiple times
  • nats example throws RuntimeError: File descriptor 8 is used by transport <_SelectorSocketTransport fd=8 read=idle write=<polling, bufsize=0>>
  • Fix tests on Windows
  • Fix exception about incomplete future when closing window while coroutine passes to run_event_loop is still running
  • Review docs
  • Test for subprocess (unix)
  • Test for async server socket

@tronical tronical force-pushed the simon/python-asyncio branch 14 times, most recently from 27c0213 to 7af9b42 Compare September 15, 2025 15:01
@tronical tronical force-pushed the simon/python-asyncio branch 3 times, most recently from bcfce97 to a36b94c Compare September 18, 2025 14:09
@tronical tronical force-pushed the simon/python-asyncio branch 11 times, most recently from 57882c3 to c6d81b7 Compare September 18, 2025 16:32
@tronical tronical force-pushed the simon/python-asyncio branch from c6d81b7 to da15c1c Compare September 18, 2025 16:53
@tronical tronical marked this pull request as ready for review September 18, 2025 17:11
@tronical tronical force-pushed the simon/python-asyncio branch from da15c1c to d56d5e4 Compare September 19, 2025 06:02
The API is minimal at this point: `slint.run_event_loop()` takes an
optional coroutine parameter, that's run. As the loop is run, an
asyncio event loop (as per asyncio.get_event_loop()) is active, which
maps socket operations to smol's Async adapter and polls them within the
Slint event loop.

cc #4137
@tronical tronical force-pushed the simon/python-asyncio branch from d56d5e4 to eeda6c5 Compare September 19, 2025 06:10
@tronical tronical merged commit ea0e3c1 into master Sep 19, 2025
40 checks passed
@tronical tronical deleted the simon/python-asyncio branch September 19, 2025 06:23
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.

1 participant