Project

General

Profile

Actions

Backport #1495

closed

warn_printf is an unhealthy thing to have in rb_thread_schedule as it can cause recursion.

Added by JohnCarter (John Carter) over 15 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
[ruby-core:23506]

Description

=begin
warn_printf is an unhealthy thing to have in rb_thread_schedule as it can (especially if you are running -rprofile) recurse back into rb_thread_schedule.

This is unhealthy as rb_thread_schedule uses several static variables and hence is not reentrant. (I discovered this when the deadlock detection reported deadlock even though there was a runnable thread! There wasn't a runnable thread, the recursion from warn_printf had just woken a thread.)

Probably present in ruby-1.8.6 as well.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0