Skip to content

Conversation

@serhii-sadovskyi
Copy link
Contributor

WIP

@serhii-sadovskyi serhii-sadovskyi force-pushed the fiber-scheduler-timeouts branch 3 times, most recently from 82919e6 to 2436c40 Compare July 14, 2025 18:55
Comment on lines 86 to 87
@fiber_timeouts[fiber].delete(timeout)
@fiber_timeouts.delete(fiber) if @fiber_timeouts[fiber].empty?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@fiber_timeouts[fiber].delete(timeout)
@fiber_timeouts.delete(fiber) if @fiber_timeouts[fiber].empty?
timeouts = @fiber_timeouts[fiber].delete(timeout)
@fiber_timeouts.delete(fiber) if timeouts.empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work, the structure is following

{
  fiber_1: { 
    timeout_1: { ... },
    timeout_2: { ... },
  },
  fiber_2: {
    timeout_3: { ... },
    timeout_4: { ... },
  }
}

@fiber_timeouts[fiber].delete(timeout) deletes fiber_1.timeout_1 key therefore it returns what was in the deleted key, whereas we need to check here whether something still present under fiber_1 key

@serhii-sadovskyi serhii-sadovskyi force-pushed the fiber-scheduler-timeouts branch 3 times, most recently from 82412c1 to 2022e5e Compare October 15, 2025 11:53
* worker to check fiber timeouts
* timeout_after implementation for fiber scheduler
…pens between fiber itself and iodine worker)

- kill fiber forcefully if it still alive after error was raised
- variable names
- removed mutex, as was added by mistake
- `check_timeouts` now is thinner after unnecessary code deletion
* simplified `check_timeouts` method
* renamed variables
* names for channels moved into a separate method
@serhii-sadovskyi serhii-sadovskyi force-pushed the fiber-scheduler-timeouts branch from 2022e5e to 86ba825 Compare December 5, 2025 15:33
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