2012-02-14
2012-02-14 22:20:53 by Jonas Wallden <jonasw@roxen.com>
-
c320bcdeb637101d47bc7084bd9fa94e3bbec262
(8 lines)
(+5/-3)
[
Show
| Annotate
]
Branch: 5.2
Name threads for the benefit of thread backtraces in the Admin interface.
Rev: server/base_server/roxen.pike:1.1109
Rev: server/base_server/snmpagent.pike:1.27
Rev: server/config_interface/actions/threads.pike:1.12
Rev: server/etc/modules/Roxen.pmod:1.326
6:
// Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.
// ABS and suicide systems contributed freely by Francesco Chemolli
- constant cvs_version="$Id: roxen.pike,v 1.1108 2012/02/14 18:06:51 jonasw Exp $";
+ constant cvs_version="$Id: roxen.pike,v 1.1109 2012/02/14 22:20:52 jonasw Exp $";
//! @appears roxen
//!
139: Inside #if defined(THREADS)
#ifdef THREADS
mapping(string:string) thread_names = ([]);
- string thread_name( object thread )
+ string thread_name( object thread, int|void skip_auto_name )
{
string tn;
- if( thread_names[ tn=sprintf("%O",thread) ] )
+ if( thread_names[ tn=sprintf("%O",thread) ] || skip_auto_name )
return thread_names[tn];
return tn;
}
5725:
void cdt_poll_file()
{
+ name_thread(this_thread(), "Dump thread file monitor");
while (this && query ("dump_threads_by_file")) {
if (array(string) dir = r_get_dir (cdt_directory)) {
if (has_value (dir, cdt_filename)) {