• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Failure attempting to implement an NSPort subclass for Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure attempting to implement an NSPort subclass for Distributed Objects


  • Subject: Re: Failure attempting to implement an NSPort subclass for Distributed Objects
  • From: Wade Tregaskis <email@hidden>
  • Date: Mon, 13 Oct 2003 18:12:36 +1000

I've finally got the thing "working". The problem now is that it only works if I provide protocols for each NSDistantObject, because as soon as either side sends a methodDescriptionForSelector: request, the reply comes back fine, but is not handled properly. I dispatch it just the same way as all other messages & replies, but the side that receives the reply just sits there doing nothing, until eventually the message below pops up.

2003-10-08 22:36:09.689 SecureThreads[2577] <NSThread: 0x114dd00>{num = 2, threadDictionary =
<CFDictionary 0x1225230 [0xa01303fc]>{type = mutable, count = 1, capacity = 3, pairs = (
2 : HierLog Whitespace = <CFString 0x1151420 [0xa01303fc]>{contents = " "}
)}
}: tossing reply message sequence 4

I'm still working on this, and have resolved it down to what I hope is a fairly generic problem, that someone out there may just be able to handle. As it turns out, the reason the reply is never received is because the request for the method descriptor apparently blocks while waiting for the reply. Since it is blocking, not running the run loops, that never happens. So eventually it gives up with the timeout above, and only then does the reply get received, but by then it's too late.

Any idea how to have socket events (CFSocket, specifically) still trigger while the thread which needs to receive the data is blocked? I'm not sure if I can rely on NSConnection to sort out the issues if I post the event from another thread. I guess I'll try it, but I don't like the idea of having a thread sitting there wasting time, just running this 'backup' runloop I'll have to use.

Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: AppleTalk/OpenTransport MacOS X Problem
  • Next by Date: Airport cards MAC Address
  • Previous by thread: Re: Failure attempting to implement an NSPort subclass for Distributed Objects
  • Next by thread: Open Transport autopush
  • Index(es):
    • Date
    • Thread