Mercurial Hosting > luan
diff src/luan/modules/http/tools/Luan_threads.luan @ 1355:b84f60ebe196
minor fixes
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 17 Apr 2019 01:32:52 -0600 |
parents | 8d95711f6615 |
children | ef1620aa99cb |
line wrap: on
line diff
--- a/src/luan/modules/http/tools/Luan_threads.luan Mon Mar 25 16:55:17 2019 -0600 +++ b/src/luan/modules/http/tools/Luan_threads.luan Wed Apr 17 01:32:52 2019 -0600 @@ -4,6 +4,8 @@ local java_to_table_shallow = Table.java_to_table_shallow or error() local Io = require "luan:Io.luan" local Time = require "luan:Time.luan" +local Table = require "luan:Table.luan" +local to_table = Table.java_to_table_shallow or error() local Http = require "luan:http/Http.luan" require "java" local Thread = require "java:java.lang.Thread" @@ -17,7 +19,7 @@ local threads = Thread.getAllStackTraces() local threads = {} - for thread, trace in Luan.pairs(Thread.getAllStackTraces()) do + for thread, trace in Luan.pairs(to_table(Thread.getAllStackTraces())) do threads[#threads+1] = { trace = trace string = thread.toString()