webmcp
view framework/env/execute/_initializers.lua @ 224:9fcdec58aa31
Removed request._app_basepath and request._app_basebase from env/request/__init.lua
| author | jbe | 
|---|---|
| date | Fri Feb 27 22:18:52 2015 +0100 (2015-02-27) | 
| parents | 6ac7133bb58e | 
| children | f66037207da8 | 
 line source
     1 function execute._initializers(initializer_path_element)
     2   local yieldvalue = {}
     3   local coro = coroutine.wrap(function()
     4     execute.multi_wrapped(
     5       execute._create_sorted_execution_list(
     6         function(add_by_path)
     7           add_by_path(initializer_path_element)
     8           add_by_path(WEBMCP_APP_NAME, initializer_path_element)
     9         end,
    10         function(full_path, relative_path)
    11           execute.file_path{ file_path = full_path }
    12         end
    13       ),
    14       function()
    15         coroutine.yield(yieldvalue)
    16       end
    17     )
    18     return yieldvalue
    19   end)
    20   local function cont()
    21     assert(coro() == yieldvalue, "Unexpected yield")
    22   end
    23   cont()
    24   execute._finalizers[#execute._finalizers+1] = cont
    25 end
