diff options
author | KOSAKI Motohiro <kosaki.motohiro@gmail.com> | 2016-01-28 16:40:02 -0500 |
---|---|---|
committer | KOSAKI Motohiro <kosaki.motohiro@gmail.com> | 2016-01-28 17:46:40 -0500 |
commit | 8dfefe2091bc901dc5deeb4bea74a0670703ac78 (patch) | |
tree | 6b80e0bf7e0f1f6985dee1cac661f521ae34c3f4 /thread.c | |
parent | bfe273f1181bfc601413ed5fba731eb64f18c3b4 (diff) | |
download | ruby-thread_inspect.tar.gz |
* thread.c (rb_thread_inspect): display @wait_for field if thethread_inspect
target thread is waiting for a mutex.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2833,7 +2833,11 @@ rb_thread_inspect(VALUE thread) rb_gc_force_recycle(loc); } } - rb_str_catf(str, ", @status=%s>", status); + rb_str_catf(str, ", @status=%s", status); + if (th->locking_mutex != Qfalse) { + rb_str_catf(str, ", @wait_for=%"PRIsVALUE, rb_inspect(th->locking_mutex)); + } + rb_str_catf(str, ">"); OBJ_INFECT(str, thread); return str; |