An Erlang style actor library for Objective-C
- 资源大小:33.03 kB
- 上传时间:2021-06-30
- 下载次数:0次
- 浏览次数:1次
- 资源积分:1积分
-
标 签:
资 源 简 介
This tiny Objective-C library allows you to send and receive asynchronous messages between processes or threads akin to the Erlang concurrency approach.
Plankton is thus an actor oriented peer-to-peer platform for asynchronous share-nothing message passing.
Messages can be any Objective-C objects which represent property-lists. Plankton uses the Cocoa property-list encoding for the on-the-wire representation. Message reception is done via the NSPredicate facility of Coca which allows for sophisticated pattern specifications.
Usage of Plankton should be easy:
1. create a PLPlatform object and cling to it
PLPlatform *platform = [[PLPlatform alloc] init];
1. create your own actor-id
NSString *aid = [platform createAid];
1. send a message to another actor (you need its aid for that)
[platform send:message to:otherAid];
1. prepare reception of messages from other actors
文 件 列 表
plankton-platform_1.4
.svn
PLBroadcaster.h
PLBroadcaster.m
PLDirectory.h
PLDirectory.m
PLEndpoint.h
PLEndpoint.m
PLInteraction.h
PLInteraction.m
PLPlatform.h
PLPlatform.m