[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with NSConnection and NSThread
From: |
Rene Cornils |
Subject: |
problem with NSConnection and NSThread |
Date: |
Tue, 7 Nov 2000 14:51:56 +0100 (MET) |
Dear subscribers,
I'm having problems in using remote objects (via NSConnection) from
within newly created threads (NSThread). Some code to illustrate the
problem:
// ----------
// initialize the connection to the server
// This method connects to the server process on a remote host
// and stores a reference to the (remote) vended object.
[connectionController initConnection];
// now use the remote object
// Invoke a method of the remote object (receiving app doesn't
// call back our sending app).
[connectionController performRemoteTask:nil];
// ok, works as expected
// now try to use the remote object from a new thread
// Same as obove except the thread.
[NSThread detachNewThreadSelector:@selector(performRemoteTask:)
toTarget:connectionController withObject:nil];
// raises exception:
// NSPortTimeoutException: timed out waiting for reply
// ----------
My setup: Linux/ix86, gcc 2.95.2 with patched libobjc (NSLock problem),
GNUstep snapshot-20001107 (make and base).
What am I doing wrong? Any hints are highly appreciated.
Thanks in advance,
Rene
- problem with NSConnection and NSThread,
Rene Cornils <=