• 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: Is it thread safe ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it thread safe ?


  • Subject: Re: Is it thread safe ?
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 9 Apr 2003 10:05:33 -0500

At 12:50 PM +0530 4/9/03, Pranav Kumar Sahu wrote:
I am using CFSocket for callback mechanism. In existing design i
have data send through global structures. Now i am moving to multithreading
environment. I was able send data by attaching CFSocketContext to my
CFSocket. Is it thread safe ?

You're trying to use networking for inter-thread communication? Why?

Why not just use normal inter-thread communication mechanisms like shared message queues? They're easier to write, easier to debug, and easier to maintain in the future.

If you've never written multithreaded code before, I suggest reading a good book on the subject and reading some example code before just trying to hack something together. Just hacking together threaded code is a good way to write code that has race conditions, priority inversions, deadlocks, stale data, etc.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.

References: 
 >Is it thread safe ? (From: Pranav Kumar Sahu <email@hidden>)

  • Prev by Date: Getting busy signal
  • Next by Date: AppleTalk socket question
  • Previous by thread: Is it thread safe ?
  • Next by thread: RE: Is it thread safe ?
  • Index(es):
    • Date
    • Thread