Skip to content

Multi-threading support #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Multi-threading support #209

wants to merge 4 commits into from

Conversation

spuun
Copy link
Member

@spuun spuun commented Apr 4, 2025

This PR will make amqproxy thread-safe and ready to use with both -Dpreview_mt and upcoming Execution Contexts.

I haven't run into any deadlocks or segfaults, but if any locks is needed around Client#channel_map and/or Upstream#channels it's already prepared for by adding Client#with_channel_map and Upstream#with_channels.

@spuun spuun requested a review from a team as a code owner April 4, 2025 09:46
@carlhoerberg
Copy link
Member

todo: update makefile with built flags for MT

@spuun
Copy link
Member Author

spuun commented Apr 28, 2025

This needs to be refactored for crystal 1.16. Since -Dmt doesn't exist a MT context needs to be created manually (and maybe make use of an ENV to control how many threads it may use?).

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