Hi, Andy Wingo <[EMAIL PROTECTED]> writes:
> I think the idea behind the check sounds good -- it is incorrect to > throw from within a critical section, and the check detects this. > > But the check is incorrect as you noticed, it should be checking if the > current thread is in a critical section. > > So we have two options, to remove the check or to fix the critical > section counter (possiblity to be thread-local). My instinct would be > that removal is the correct solution in 1.8, and that in master the > decision depends on whether we merge the BDW GC or not, and what the > impact that GC has on the idea of critical sections. Looking at uses of critical sections, it's not always clear what the rationale is. In some cases, e.g., `scm_sys_modify_instance ()' and `scm_sys_modify_class ()', it's used to make an operation atomic. In other cases, it seems to be used as a coarse-grain mutex (e.g., `scm_symbol_to_keyword ()', `scm_set_object_property_x ()'). So, at first sight, I'm not sure changing GCs would lead us to change that. Thanks, Ludo'.