zoukankan      html  css  js  c++  java
  • AKKA初体验

    关于thread和actor下面这段话讲的很好
    Experienced developers have learned to be very careful with unrestricted threads and various blocking mechanisms of a (real-time) operating system, because they often lead to programs that are unsafe and difficult to reason about. Instead, experts apply the following best practices of concurrent programming:1.Keep data isolated and bound to threads. Threads should hide (encapsulate) their private data and other resources, and not share them with the rest of the system.2.Communicate among threads asynchronously via messages (event objects). Using asynchronous events keeps the threads running truly independently, without blocking on each other.3.Threads should spend their lifetime responding to incoming events, so their mainline should consist of an event-loop that handles events one at a time (to completion), thus avoiding any concurrency hazards within a thread itself.While these practices can be applied manually on top of the "free threading" approach, a better way is to use the Active Object (Actor) pattern, which inherently supports and automatically enforces the best practices of concurrent programming.

    这个 是介绍Akka在线程封装 隐藏通信~ 线程低耦合 复用执行上面的优点~

    还是从未来的 分布式 并发编程 门槛降低的视角 再介绍akka~

    Netty的使用!

  • 相关阅读:
    【解题报告】CF939E
    【解题报告】洛谷P4653 [CEOI2017]Sure Bet
    【解题报告】洛谷P3406 海底高铁
    【解题报告】洛谷P1097 统计数字
    微信开发者工具下载和安装
    STS下载和安装
    HBuilderX下载和安装
    Navicat Premium下载与安装
    PLSQL下载和安装
    Oracle 11g的安装
  • 原文地址:https://www.cnblogs.com/drawwindows/p/5220331.html
Copyright © 2011-2022 走看看