summaryrefslogtreecommitdiff
path: root/server/src/async/loadfile.lua
blob: a7838f7f587e0cf38579d82e9d19365c4a9677e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
require 'utility'
local fs = require 'bee.filesystem'

while true do
    local filename = IN:bpop()
    local buf = io.load(fs.path(filename))
    if buf then
        OUT:push(filename, buf)
    end
    GC:push(ID, collectgarbage 'count')
end