Skip to content

Commit

Permalink
Release gvl when waiting with timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 7, 2021
1 parent a81c552 commit 181c7a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/event/backend/epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@ VALUE Event_Backend_EPoll_select(VALUE self, VALUE duration) {
.timeout = 0
};

select_internal_without_gvl(&arguments);
select_internal_with_gvl(&arguments);

if (arguments.count == 0) {
arguments.timeout = make_timeout(duration);

if (arguments.timeout != 0) {
select_internal_with_gvl(&arguments);
select_internal_without_gvl(&arguments);
}
}

Expand Down

0 comments on commit 181c7a0

Please sign in to comment.