webmcp
view framework/env/execute/_initializers.lua @ 264:8aa38ddcc1b2
New configuration options "min_requests_per_connect" and "max_requests_per_connect"; Bugfix: Send headers added with request.add_header(...) also in case of 303 Redirect
| author | jbe | 
|---|---|
| date | Fri Mar 20 05:30:57 2015 +0100 (2015-03-20) | 
| parents | f66037207da8 | 
| children | 2ddbb44680f7 | 
 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           if WEBMCP_APP_NAME then  -- allow for interactive mode
     9             add_by_path(WEBMCP_APP_NAME, initializer_path_element)
    10           end
    11         end,
    12         function(full_path, relative_path)
    13           execute.file_path{ file_path = full_path }
    14         end
    15       ),
    16       function()
    17         coroutine.yield(yieldvalue)
    18       end
    19     )
    20     return yieldvalue
    21   end)
    22   local function cont()
    23     assert(coro() == yieldvalue, "Unexpected yield")
    24   end
    25   cont()
    26   execute._finalizers[#execute._finalizers+1] = cont
    27 end
