DistributedObjects, threads, sharing NSData
DistributedObjects, threads, sharing NSData
- Subject: DistributedObjects, threads, sharing NSData
- From: Peter Fischer <email@hidden>
- Date: Sat, 15 May 2004 20:21:59 -0400
Hello all -
I'll try to keep this as brief as possible. I have a program that
uses DO to communicate with threads in the same process. Is it
possible to create an NSMutableData object in one thread, and have
another thread modify the same NSMutableData object? For example:
I have the following objects, and have already set up the DO threaded
object
RemoteObject (//Distributed Object)
MyData (NSMutableData)
Can I send a pointer down to the Remote object, retain the MyData
object, and add data at a later time?
[RemoteObject set
Data:MyData];
when the RemoteObject attempts to add data to the previously passed
NSMutableData object, an excetion is thrown:
** -[NSConcreteData appendBytes:length:]: selector not recognized
I know it is different threads, but its in the same process, so I would
think this is possible. I have tried passing with bycopy & byref
keywords as well, but still no luck. I would rather not have to pass
all the Data back & forth through the proxy. Please let me know if
there is anything I can do. Thanks in advance.
--Pete
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.