Skip to content

Conversation

@scottmarchant
Copy link
Collaborator

@scottmarchant scottmarchant commented Dec 2, 2025

Summary

Implement AsyncEventLoopExecutor that forms the basis of operations for NIOAsyncRuntime

Details

  • d7f5ff7 feat: Add AsyncEventLoopExecutor that forms the foundation for creating AsyncEventLoop.

Usage Examples

  • Spin up an executor and drive scheduled work:
let executor = AsyncEventLoopExecutor(loopID: UUID())
executor.enqueue { print("run on loop") }
let jobID = executor.schedule(after: .milliseconds(10), job: { print("delayed") }, failFn: { _ in })
await executor.run()
executor.cancelScheduledJob(withID: jobID)

Testing Performed

Tests coverage provided in tests ported from NIOPosix: #6.

The changes have also been tested in real-world application by running GraphManager and QuantumProjectManager in the browser to migrate database schemas, connect with our server, and pull data from a real user account.

PR Dependencies

#3

Overview of all changes

All planned changes can be viewed together in #2

@scottmarchant scottmarchant changed the title feat: Implement AsyncEventLoopExecutor that forms the basis of operations for NIOAsyncRuntime feat: Implement AsyncEventLoopExecutor Dec 2, 2025
@scottmarchant scottmarchant changed the title feat: Implement AsyncEventLoopExecutor feat: Implement AsyncEventLoopExecutor to lay foundation Dec 2, 2025
@scottmarchant scottmarchant changed the base branch from main to build/setUpInitialPackageAndCI December 2, 2025 18:06
@scottmarchant scottmarchant force-pushed the feat/implementAsyncEventLoopExecutor branch from 2b0a755 to 2eca931 Compare December 2, 2025 18:09
@scottmarchant scottmarchant self-assigned this Dec 2, 2025
@scottmarchant scottmarchant marked this pull request as ready for review December 2, 2025 20:20
@CrownedPhoenix
Copy link
Collaborator

Did this start as copy-pasta from a NIO implementation and then get pruned down to rip out unavailable dependencies?

Base automatically changed from build/setUpInitialPackageAndCI to main December 3, 2025 18:41
@scottmarchant
Copy link
Collaborator Author

scottmarchant commented Dec 3, 2025

Did this start as copy-pasta from a NIO implementation and then get pruned down to rip out unavailable dependencies?

@CrownedPhoenix No, this started out as a new implementation. It actually started out really simple, just had the actor serial guard. But grew rather complex with all the different edge cases required for unit test parity. At some point, I wouldn't mind revisiting it and trying to split apart some of the responsibilities. It is admittedly pretty hard to follow right now.

@scottmarchant scottmarchant force-pushed the feat/implementAsyncEventLoopExecutor branch from 2eca931 to a0368a0 Compare December 3, 2025 20:17
@scottmarchant scottmarchant merged commit 6fc0207 into main Dec 3, 2025
23 checks passed
@scottmarchant scottmarchant deleted the feat/implementAsyncEventLoopExecutor branch December 3, 2025 20:44
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.

5 participants