下面的指令是热部署干活的指令:
%%-----------------------------------------------------------------
%% An unpurged module is a module for which there exist an old
%% version of the code. This should only be the case if there are
%% processes running the old version of the code.
%%
%% This functions evaluates each instruction. Note that the
%% instructions here are low-level instructions. e.g. lelle's
%% old synchronized_change would be translated to
%% {load_object_code, Modules},
%% {suspend, Modules}, [{load, Module}],
%% {resume, Modules}, {purge, Modules}
%% Or, for example, if we want to do advanced external code change
%% on two modules that depend on each other, by killing them and
%% then restaring them, we could do:
%% {load_object_code, [Mod1, Mod2]},
%% % delete old version
%% {remove, {Mod1, brutal_purge}}, {remove, {Mod2, brutal_purge}},
%% % now, some procs migth be running prev current (now old) version
%% % kill them, and load new version
%% {load, {Mod1, brutal_purge}}, {load, {Mod2, brutal_purge}}
%% % now, there is one version of the code (new, current)
%%
%% NOTE: All load_object_code must be first in the script,
%% a point_of_no_return must be present (if load_object_code
%% is present).
%%
%% {load_object_code, {Lib, LibVsn, [Mod]}
%% read the files as binarys. do not make code out of them
%% {load, {Module, PrePurgeMethod, PostPurgeMethod}}
%% Module must have been load_object_code:ed. make code out of it
%% old procs && soft_purge => no new release
%% old procs && brutal_purge => old procs killed
%% The new old code will be gc:ed later on, if PostPurgeMethod =
%% soft_purge. If it is brutal_purge, the code is purged when
%% the release is made permanent.
%% {remove, {Module, PrePurgeMethod, PostPurgeMethod}}
%% make current version old. no current left.
%% old procs && soft_purge => no new release
%% old procs && brutal_purge => old procs killed
%% The new old code will be gc:ed later on, if PostPurgeMethod =
%% soft_purge. If it is brutal_purge, the code is purged when
%% the release is made permanent.
%% {purge, Modules}
%% kill all procs running old code, delete old code
%% {suspend, [Module | {Module, Timeout}]}
%% If a process doesn't repsond - never mind. It will be killed
%% later on (if a purge is performed).
%% Hmm, we must do something smart here... we should probably kill it,
%% but we cant, because its supervisor will restart it directly! Maybe
%% we should keep a list of those, call supervisor:terminate_child()
%% when all others are suspended, and call sup:restart_child() when the
%% others are resumed.
%% {code_change, [{Module, Extra}]}
%% {code_change, Mode, [{Module, Extra}]} Mode = up | down
%% Send code_change only to suspended procs running this code
%% {resume, [Module]}
%% resume all previously suspended processes
%% {stop, [Module]}
%% stop all procs running this code
%% {start, [Module]}
%% starts the procs that were previously stopped for this code.
%% Note that this will start processes in exactly the same place
%% in the suptree where there were procs previously.
%% {sync_nodes, Id, [Node]}
%% {sync_nodes, Id, {M, F, A}}
%% Synchronizes with the Nodes (or apply(M,F,A) == Nodes). All Nodes
%% must also exectue the same line. Waits for all these nodes to get
%% to this line.
%% point_of_no_return
%% restart_new_emulator
%% {stop_application, Appl} - Impl with apply
%% {unload_application, Appl} - Impl with {remove..}
%% {load_application, Appl} - Impl with {load..}
%% {start_application, Appl} - Impl with apply
%%-----------------------------------------------------------------
见release_handler_1.erl, 指令不是很多,基本上是bif的封装。
分享到:
相关推荐
在STM32的调试过程中,当系统陷入HardFault_Handler中断,即硬故障处理程序时,通常表示系统遇到了无法恢复的错误,比如尝试访问不存在的内存、执行了非法指令、栈溢出等情况。为了快速定位问题代码段,我们可以通过...
资源分类:Python库 所属语言:Python 使用前提:需要解压 资源全名:concurrent_log_handler-0.9.4-py2.py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
STM32微控制器在执行过程中可能会遇到各种故障,其中一种常见的严重故障是“HardFault_Handler”,这通常意味着处理器无法正常执行指令,可能是由于内存管理错误、堆栈溢出或访问越界等问题引起的。本文主要讨论栈...
mldonkey_protocol_handler-2.5.xpimldonkey_protocol_handler-2.5.xpimldonkey_protocol_handler-2.5.xpi
标题中的"IIC_INT_Handler_LPC IIC_lpc2368_lpc2368"表明这个压缩包文件包含的是关于LPC2368微控制器的I2C(Inter-Integrated Circuit)中断处理程序。I2C是一种两线制通信协议,常用于微控制器与各种外围设备如...
例如,`iw_handler_set`函数指针用于处理设置无线参数的请求,`iw_handler_get`则用于处理获取无线参数的请求。通过这种方式,iw_handler为无线驱动提供了一种标准化的接口,使得不同厂商的无线设备可以在相同的API...
本项目"Thread_Handler_MessageDownload"着重探讨了如何利用Thread、Handler和Message机制实现异步下载网络图片,确保UI线程不被阻塞,提高应用的响应速度。 首先,我们需要了解Android系统对线程的管理。在Android...
资源来自pypi官网。 资源全名:splunk_hec_handler-1.1.0-py3.6.egg
wb_handler作为Wishbone总线的控制器,扮演着协调者和管理者的角色,确保了FPGA内各模块之间的通信流畅、高效。 wb_handler的主要功能包括: 1. **地址解码**:它接收从主设备发送过来的地址信号,通过地址解码确定...
在实际应用中,`pycontw_mail_handler`可能包括以下功能: 1. **邮件发送**:提供简单的API,让开发者可以轻松地构造并发送邮件,包括附件、HTML内容等。 2. **邮件接收**:支持IMAP或POP3协议,可以自动下载或实时...
此外,如果你在生产环境中调试,应当谨慎使用 `set_error_handler()`,因为它可能会掩盖某些实际问题,除非你确保错误信息会被记录或正确处理。 通过使用 `set_error_handler()`,你可以实现更高级的错误管理策略,...
在 debug 时,可以查看堆栈里的值依次为R0~R3、R12、LR、PC、XPRS,例如R0(10 27 00 00),显然堆栈后第21个字节到24字节即为LR,该地址0x08001FFD即为异常前PC将要执行的下一条指令地址(即StackFlow()后面的语句...
当相同的模板再次被请求时,Smarty会首先检查Memcache中是否存在缓存,如果存在则直接返回,避免了重新编译和执行模板。 5. **使用步骤**: - 配置Smarty实例,将缓存处理设置为`memcache_cache_handler`。 - ...
1. **文件上传**: `django_simple_file_handler`简化了文件上传的流程,允许开发者通过定义简单的模型字段和视图来处理文件上传请求,无需过多关注底层实现细节。 2. **文件存储**: 库内建了多种存储后端,包括本地...
在实际开发中,SQLAlchemy 和 SQLAlchemy_Api_Handler 可以帮助开发者更专注于业务逻辑,而不是底层的数据库操作,从而提高开发效率和代码质量。但同时,也要注意性能优化,避免过度使用ORM导致的性能损失。
本篇将深入探讨"S60_Platform_Document_Handler_Example"这一主题,它是Symbian平台上关于文档处理的一个示例应用,对于理解Symbian系统及其开发环境具有重要意义。 首先,Symbian操作系统是一种微内核的实时操作...
《C++内存分配处理函数set_new_handler的使用详解》 C++编程语言提供了一种机制,当内存分配失败时能够自定义处理行为,这就是通过`set_new_handler`函数。这个函数允许程序员在new操作或new[]操作无法为对象分配...