webmcp

annotate framework/env/execute/_initializers.lua @ 226:17baf126ea88

Fixed typo in execute._create_sorted_execution_list(...)
author jbe
date Fri Feb 27 22:31:07 2015 +0100 (2015-02-27)
parents 6ac7133bb58e
children f66037207da8
rev   line source
jbe@214 1 function execute._initializers(initializer_path_element)
jbe@214 2 local yieldvalue = {}
jbe@214 3 local coro = coroutine.wrap(function()
jbe@214 4 execute.multi_wrapped(
jbe@214 5 execute._create_sorted_execution_list(
jbe@214 6 function(add_by_path)
jbe@214 7 add_by_path(initializer_path_element)
jbe@214 8 add_by_path(WEBMCP_APP_NAME, initializer_path_element)
jbe@214 9 end,
jbe@214 10 function(full_path, relative_path)
jbe@214 11 execute.file_path{ file_path = full_path }
jbe@214 12 end
jbe@214 13 ),
jbe@214 14 function()
jbe@214 15 coroutine.yield(yieldvalue)
jbe@214 16 end
jbe@214 17 )
jbe@214 18 return yieldvalue
jbe@214 19 end)
jbe@214 20 local function cont()
jbe@214 21 assert(coro() == yieldvalue, "Unexpected yield")
jbe@214 22 end
jbe@214 23 cont()
jbe@214 24 execute._finalizers[#execute._finalizers+1] = cont
jbe@214 25 end

Impressum / About Us