00001 /* 00002 * Author: Landon Fuller <landonf@plausiblelabs.com> 00003 * Copyright (c) 2008 Plausible Labs Cooperative, Inc. 00004 * All rights reserved. 00005 * 00006 * Permission is hereby granted, free of charge, to any person 00007 * obtaining a copy of this software and associated documentation 00008 * files (the "Software"), to deal in the Software without 00009 * restriction, including without limitation the rights to use, 00010 * copy, modify, merge, publish, distribute, sublicense, and/or sell 00011 * copies of the Software, and to permit persons to whom the 00012 * Software is furnished to do so, subject to the following 00013 * conditions: 00014 * 00015 * The above copyright notice and this permission notice shall be 00016 * included in all copies or substantial portions of the Software. 00017 * 00018 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00019 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00020 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00021 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 00022 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00023 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00024 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00025 * OTHER DEALINGS IN THE SOFTWARE. 00026 */ 00027 00028 @protocol PLActorProcess; 00029 00030 #ifdef ACTOR_PRIVATE_API 00031 @protocol PLActorLocalProcess; 00032 #endif 00033 00034 @interface PLActorKit : NSObject 00035 00036 + (id<PLActorProcess>) spawnWithTarget: (id) target selector: (SEL) selector; 00037 00038 + (id) receive; 00039 + (BOOL) receive: (id *) message withTimeout: (PLActorTimeInterval) timeout; 00040 00041 #ifdef HAVE_NSPREDICATE 00042 + (id) receiveUsingPredicate: (NSPredicate *) predicate; 00043 + (BOOL) receive: (id *) message usingPredicate: (NSPredicate *) predicate withTimeout: (PLActorTimeInterval) timeout; 00044 #endif /* HAVE_NSPREDICATE */ 00045 00046 + (BOOL) receive: (id *) message usingFilter: (plactor_receive_filter_t) filter filterContext: (void *) context withTimeout: (PLActorTimeInterval) timeout; 00047 00048 + (PLActorTxId) createTransactionId; 00049 00050 + (id<PLActorProcess>) process; 00051 00052 #ifdef ACTOR_PRIVATE_API 00053 00054 + (void) setThreadProcess: (id<PLActorLocalProcess>) mailbox; 00055 + (id<PLActorLocalProcess>) threadProcess; 00056 00057 #endif /* ACTOR_PRIVATE_API */ 00058 00059 @end
1.5.5