Skip to content

Conversation

Guest0x0
Copy link
Collaborator

refactor internal runtime:

  • merge @thread_pool and @event_loop into one module
  • turn API of runtime into completion based, move all async IO primitives to the runtime
  • offload socket recv/send operations to the thread pool
  • misc simplification

- thread pool: avoid unnecessary lock & shift more logic to MoonBit
- use external object for job memory management
- some slight API tweak
@coveralls
Copy link

coveralls commented Aug 13, 2025

Pull Request Test Coverage Report for Build 139

Details

  • 130 of 152 (85.53%) changed or added relevant lines in 11 files are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.9%) to 82.412%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/internal/event_loop/event_loop.mbt 104 126 82.54%
Files with Coverage Reduction New Missed Lines %
src/internal/event_loop/event_loop.mbt 1 85.23%
src/internal/event_loop/poll.mbt 1 50.0%
src/io/buffered_reader.mbt 3 90.63%
Totals Coverage Status
Change from base Build 134: 0.9%
Covered Lines: 656
Relevant Lines: 796

💛 - Coveralls

- merge `@event_loop` and `@thread_pool` into one package
- turn all async IO primitive into job based & move to `@event_loop`
- offload pipe and socket operations to worker thread
@Guest0x0 Guest0x0 force-pushed the refactor-runtime branch 2 times, most recently from 2b17bac to 595a3c7 Compare August 13, 2025 07:43
@Guest0x0 Guest0x0 merged commit b03b5fe into main Aug 13, 2025
9 checks passed
@Guest0x0 Guest0x0 deleted the refactor-runtime branch August 13, 2025 07:52
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