Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

readme edits and cleanup

  • Loading branch information...
commit dba6b64d526b7c16e49203a97145e120dd20e0d6 1 parent 9ce3e60
@stevedekorte authored
View
4 ActorKit.xcodeproj/project.pbxproj
@@ -110,10 +110,10 @@
AA2FB4A1141F533C00E57E01 /* FutureProxy.m */,
AAD0098F141F0ED200566C36 /* Mutex.h */,
AAD00990141F0ED200566C36 /* Mutex.m */,
- AA9A97861419785000A2994E /* NSThread+Actor.h */,
- AA9A97871419785000A2994E /* NSThread+Actor.m */,
AA2FB4A7141F5EB700E57E01 /* NSObject+Actor.h */,
AA2FB4A8141F5EB700E57E01 /* NSObject+Actor.m */,
+ AA9A97861419785000A2994E /* NSThread+Actor.h */,
+ AA9A97871419785000A2994E /* NSThread+Actor.m */,
AABB5D9F140E0C220020BA06 /* Supporting Files */,
);
path = ActorKit;
View
3  ActorKit/ActorKit.h
@@ -8,5 +8,6 @@
#import "ActorProxy.h"
#import "FutureProxy.h"
-#import "NSThread+Actor.h"
+#import "Mutex.h"
#import "NSObject+Actor.h"
+#import "NSThread+Actor.h"
View
5 README.txt
@@ -9,6 +9,7 @@ About:
Any message to an actor returns a "future" object which only blocks when it is accessed.
Futures detect and raise an exception in situations that would cause a deadlock.
+
Example:
// these spawn threads to and return immediately
@@ -21,9 +22,10 @@ Example:
NSLog(@"request 1 returned %i bytes", (int)[future1 length]);
NSLog(@"request 2 returned %i bytes", (int)[future2 length]);
- // We just did a coordinated interaction between three threads
+ // We just did a safe, coordinated interaction between three threads
// by only adding two tokens and with no state machines or callbacks
+
Notes:
// you'll need to add this method for the above example because
@@ -33,6 +35,7 @@ Notes:
- (NSData *)fetch:sender { return [NSData dataWithContentsOfURL:self]; }
@end
+
Credits:
Thanks to Mark Papadakis for help with figuring out how to properly use mutex conditions.
Please sign in to comment.
Something went wrong with that request. Please try again.