Mercurial Hosting > luan
diff src/luan/modules/http/tools/Java_threads.luan @ 1355:b84f60ebe196
minor fixes
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 17 Apr 2019 01:32:52 -0600 |
parents | 8d95711f6615 |
children |
line wrap: on
line diff
--- a/src/luan/modules/http/tools/Java_threads.luan Mon Mar 25 16:55:17 2019 -0600 +++ b/src/luan/modules/http/tools/Java_threads.luan Wed Apr 17 01:32:52 2019 -0600 @@ -2,6 +2,8 @@ local error = Luan.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" @@ -14,7 +16,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()