Skip to content

Conversation

@miry
Copy link
Contributor

@miry miry commented Apr 16, 2025

I found if set the Single Thread mode true then tests returns:

NoMethodError: undefined method '-' for nil
            lib/crystalruby/reactor.rb:133:in 'CrystalRuby::Reactor.gc_due?'
            lib/crystalruby/reactor.rb:121:in 'CrystalRuby::Reactor.invoke_gc_if_due!'
            lib/crystalruby/reactor.rb:199:in 'CrystalRuby::Reactor.schedule_work!'
            lib/crystalruby/function.rb:73:in 'block (2 levels) in TestTime#define_crystallized_methods!'
            test/types/test_time.rb:30:in 'TestTime#test_it_can_do_time_math'

@miry miry force-pushed the single-thread-reactor-op-count branch from f485b82 to b0cdd4b Compare April 16, 2025 07:53
@miry miry changed the title Setup Github Action fix: Make sure the class variable op_count is initialized Apr 16, 2025
@miry miry changed the title fix: Make sure the class variable op_count is initialized fix: Make sure the variable op_count is initialized Apr 16, 2025
@miry miry marked this pull request as ready for review April 16, 2025 07:53
@miry miry force-pushed the single-thread-reactor-op-count branch from b0cdd4b to 0bb7edf Compare April 16, 2025 07:57
When run Reactor in the single thread mode, skips the Initialization of
the @op_count.

```
NoMethodError: undefined method '-' for nil
            lib/crystalruby/reactor.rb:133:in 'CrystalRuby::Reactor.gc_due?'
            lib/crystalruby/reactor.rb:121:in 'CrystalRuby::Reactor.invoke_gc_if_due!'
            lib/crystalruby/reactor.rb:199:in 'CrystalRuby::Reactor.schedule_work!'
            lib/crystalruby/function.rb:73:in 'block (2 levels) in TestTime#define_crystallized_methods!'
            test/types/test_time.rb:30:in 'TestTime#test_it_can_do_time_math'`
```
@miry miry force-pushed the single-thread-reactor-op-count branch from 0bb7edf to 58247ca Compare April 16, 2025 07:58
@wouterken wouterken merged commit 4420411 into wouterken:main Apr 27, 2025
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