.. _stdlib_cross_context: ================================================================== A module required after the walk, and calls into its macro context ================================================================== .. das:module:: cross_context The CROSS_CONTEXT module requires a ``shared`` module after the prerequisite walk - from a macro, a simulate macro or an ``[init]``, never from a running script, which has no compile for the module to join - and calls into its macro context by function name, so a module that is expensive to bring up and only sometimes needed comes in at the point that decides it needs it. The function reached by name is ``[export]``\ ed - a macro context keeps only exported, ``[init]``, ``[finalize]`` and macro-init functions - and it runs under the target context's lock, so it must not call back into the calling context; everything the caller needs comes back through the result pointer. All functions and symbols are in "cross_context" module, use require to get access to it. .. code-block:: das require daslib/cross_context ++++++++++++ Late require ++++++++++++ * :ref:`macro_context_of (name: string) : Context? ` * :ref:`require_module_now (name: string) : Module? ` .. _function-cross_context_macro_context_of_string: .. das:function:: macro_context_of(name: string) : Context? The macro context of the shared module `name`, required now when the process lacks it; null, logged, when the module has no macros. :Arguments: * **name** : string .. _function-cross_context_require_module_now_string: .. das:function:: require_module_now(name: string) : Module? Compiles `name` - a `shared` module - and its prerequisites now, under the compiling program's policies and file access, or answers the one already in the process; a panic outside a compile (a macro, a simulate macro, an `[init]`). Null, logged, on failure. :Arguments: * **name** : string