Forum OpenACS Improvement Proposals (TIPs): Re: Display errors that occurred while sourcing a file in APM package-reload page.

to create just one ns_mutex, you can use apm_first_time_loading_p. see acs-tcl/tcl/utilities-procs.tcl for an example.

Without having currently the time to look into the details, i don't like the fact that on errors, it might be the case that the mutex might not be unlocked, such that a future attempt will wait forever. Use "ad_mutex_eval $mutex $script" to avoid this problem in oacs-5-8.

The patch already only creates one mutex (in the same way as other APM bootstrap mutexes are created). The mutex is not held when sourceing package code. It is only held around an nsv_lappend invocation or when removing past error-messages from the list, as those are 2 places where a modification to a shared variable occurs.