- 授权协议: LGPL
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/laforge49/JActor
- 软件文档: http://jactorconsulting.com/product/jactor/
软件介绍
JActor 是一个 Java 的 Actor 模式的实现,经过测试在 i5 CPU 上可支持每秒钟发送超过亿条消息,可能是目前最快的。这相当于是 Scala 的 Actor 的纯 Java 版本。
示例代码:
// Create a mailbox factory with a pool of 10 threads. MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(10); // Create and initialize a Test actor. Mailbox mailbox = mailboxFactory.createAsyncMailbox();//.createMailbox(); MyActor actor = new MyActor(); actor.initialize(mailbox); // Send a MyRequest request and wait for completion. JAFuture future = new JAFuture(); long ct = System.currentTimeMillis(); System.out.println(MyRequest.req.send(future, actor)); // Shut down the thread pool. mailboxFactory.close();
未来世界的幸存者
阮一峰 / 人民邮电出版社 / 2018-6-1 / 39.00 元
本书为阮一峰博客文集,主要收录的是作者对技术变革的影响的一些思考,希望能够藉此书让读者意识到世界正在剧烈变化,洪水就在不远处,从而早早准备出路。本书适合所有乐于思考的读者。一起来看看 《未来世界的幸存者》 这本书的介绍吧!
