1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

variable.c (autoload_sleep_done): avoid needless list_node init

We do not need list_del_init in ensure callbacks, only list_del,
since it can only ever be called after list_del_init in
autoload_reset.  So avoid the needless re-initialization.

* variable.c (autoload_sleep_done): s/list_del_init/list_del/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2017-05-22 23:41:50 +00:00
parent 35695788d1
commit 2ab827042e

View file

@ -2141,7 +2141,7 @@ autoload_sleep_done(VALUE arg)
struct autoload_state *state = (struct autoload_state *)arg;
if (state->thread != Qfalse && rb_thread_to_be_killed(state->thread)) {
list_del_init(&state->waitq.node); /* idempotent */
list_del(&state->waitq.node); /* idempotent after list_del_init */
}
return Qfalse;