Mercurial Hosting > luan
comparison src/luan/modules/http/tools/luan_threads.luan @ 1164:1f9d34a6f308
remove assertions
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 07 Feb 2018 17:36:38 -0700 |
parents | 0842b9b570f8 |
children | 5dbb552075ff |
comparison
equal
deleted
inserted
replaced
1163:fef8f0742da9 | 1164:1f9d34a6f308 |
---|---|
1 local Luan = require "luan:Luan.luan" | 1 local Luan = require "luan:Luan.luan" |
2 local error = Luan.error | 2 local error = Luan.error |
3 local assert_table = Luan.assert_table or error() | |
4 local Io = require "luan:Io.luan" | 3 local Io = require "luan:Io.luan" |
5 local Time = require "luan:Time.luan" | 4 local Time = require "luan:Time.luan" |
6 local Http = require "luan:http/Http.luan" | 5 local Http = require "luan:http/Http.luan" |
7 java() | 6 java() |
8 local Thread = require "java:java.lang.Thread" | 7 local Thread = require "java:java.lang.Thread" |
9 local LuanException = require "java:luan.LuanException" | 8 local LuanException = require "java:luan.LuanException" |
9 local JavaLuan = require "java:luan.Luan" | |
10 | 10 |
11 | 11 |
12 return function() | 12 return function() |
13 Io.stdout = Http.response.text_writer() | 13 Io.stdout = Http.response.text_writer() |
14 | 14 |
27 <h1>Luan Threads</h1> | 27 <h1>Luan Threads</h1> |
28 <p><%=Http.request.headers["host"]%> - <%=Time.format(Time.now())%></p> | 28 <p><%=Http.request.headers["host"]%> - <%=Time.format(Time.now())%></p> |
29 <% | 29 <% |
30 local count = 0 | 30 local count = 0 |
31 for _, thread in Luan.ipairs(threads) do | 31 for _, thread in Luan.ipairs(threads) do |
32 local luan_trace = assert_table(LuanException.justLuan(thread.trace)) | 32 local luan_trace = JavaLuan.table(LuanException.justLuan(thread.trace)) |
33 if #luan_trace > 0 then | 33 if #luan_trace > 0 then |
34 %> | 34 %> |
35 <p><%=thread.string%> <%=thread.state%> | 35 <p><%=thread.string%> <%=thread.state%> |
36 <ul> | 36 <ul> |
37 <% | 37 <% |