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

Remove unsupported way to run callbacks on signal #464

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

miry
Copy link
Contributor

@miry miry commented Jan 10, 2023

In tests used lru clean table with Mutex in fork process on exit.
It is not supported anymore and could be removed https://bugs.ruby-lang.org/issues/14222.

Sample exception:

Class: ThreadError
Message: can't be called from trap context
---Backtrace---
lib/semian/lru_hash.rb:110:in `synchronize'
lib/semian/lru_hash.rb:110:in `delete'
lib/semian.rb:231:in `unregister'
test/resource_test.rb:67:in `block in test_unregister_past_0'

Could not run

@lock.synchronize do
inside Signal.trap.

@miry miry self-assigned this Jan 10, 2023
@miry miry added the Semian label Jan 10, 2023
@miry miry marked this pull request as ready for review January 10, 2023 17:27
@miry miry requested review from a team, neufeldtech, QuantumManiac and keldin-coding and removed request for a team January 10, 2023 17:32
In tests used lru clean table with Mutex in fork process on exit.
It is not supported anymore and could be removed https://bugs.ruby-lang.org/issues/14222.

Sample exception:

```
Class: ThreadError
Message: can't be called from trap context
---Backtrace---
lib/semian/lru_hash.rb:110:in `synchronize'
lib/semian/lru_hash.rb:110:in `delete'
lib/semian.rb:231:in `unregister'
test/resource_test.rb:67:in `block in test_unregister_past_0'
```
@miry miry merged commit 1dab1fe into Shopify:master Jan 11, 2023
@miry miry deleted the thread-signal branch January 11, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant