-
Notifications
You must be signed in to change notification settings - Fork 25
(WIP) Fiber Timeouts #162
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
base: main
Are you sure you want to change the base?
(WIP) Fiber Timeouts #162
Conversation
82919e6 to
2436c40
Compare
lib/rage/fiber_scheduler.rb
Outdated
| @fiber_timeouts[fiber].delete(timeout) | ||
| @fiber_timeouts.delete(fiber) if @fiber_timeouts[fiber].empty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @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? |
There was a problem hiding this comment.
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
82412c1 to
2022e5e
Compare
…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
2022e5e to
86ba825
Compare
WIP