Migrate from containers-thread to moonpool#81
Merged
Conversation
Replace containers-thread with moonpool for parallel execution: - Use Moonpool.Fifo_pool for thread pool management - Use Moonpool.Fut for futures and async task execution - Use Moonpool.Lock instead of CCLock for mutual exclusion - Use Moonpool.Blocking_queue for task queue and resource management Benefits: - Pool size directly enforces parallelism limit (no need for semaphore) - Modern OCaml 5.x compatible library with better scheduling Key changes: - Par_map.map_p: Create pool with num_threads=j, spawn futures, wait for results - Par_map.map_with_resource: Use blocking queue for dynamic resource allocation - Replace CCLock.with_lock with Moonpool.Lock.with_ - Replace CCThread operations with stdlib Thread operations
Relax moonpool constraint to >= 0.9
Update CI to test on 4.14.x, 5.1.x, 5.4.x
04c8d06 to
3cdec6b
Compare
- Use Linol.Lsp.Types instead of Lsp.Types - Add uri_to_string helper for DocumentUri.to_string - Update Diagnostic.create message parameter to use `String tag - Add workDoneToken and partialResultToken parameters to LSP methods - Implement spawn_query_handler using Thread.create - Update SaveOptions to use `SaveOptions tag in config_sync_opts
This allows CI to run on PRs that target branches other than master, such as feature branches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace containers-thread with moonpool for parallel execution. Pool size enforces parallelism, blocking queue manages CPU affinity resources.