Skip to content
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

Refactor to support Crystal 1.1.1 #4

Merged
merged 1 commit into from
Apr 23, 2022

Conversation

noahlh
Copy link
Contributor

@noahlh noahlh commented Sep 10, 2021

First off, @akitaonrails, thank you for creating this! It's exactly what I needed for my project.

I upgraded to Crystal 1.1.1 and everything broke, though :( I saw also that #3 refers to the same issue.

So I dug in, and in I did a small refactor for compatibility with Crystal 1.1.1

The issue is that the Crystal team made Channel::StrictReceiveAction private in #9564 and, in general in other discussions, has discouraged folks from using internal Channel implementation details. So really, we should just be using Channel#send and Channel#receive.

So I modified the code here slightly to do that. Instead of an array of Channels (one for each worker), I'm using a single communication channel and the array stores references to the workers themselves.

This is a first stab at a solution and I'm sure it can be improved / cleaned-up, but it works! I'm happily chugging along again.

@akitaonrails akitaonrails merged commit 3410d98 into akitaonrails:master Apr 23, 2022
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