LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2004, 10:14 PM   #1
mxandres
LQ Newbie
 
Registered: Jul 2004
Location: San Francisco
Posts: 8

Rep: Reputation: 0
can a reader thread and a writer thread r/w to same fd


RedHat Linux 7.3

Can program A with 1 thread for reading and 1 thread for writing read and write to the same open socket that is connected to Program B?

Can program B with 1 thread for reading and 1 thread for writing, read and write to the same socket, which is the other end of the connected socket of program A?

I am using select in these programs. They start off fine, then they get into a pattern of blocking for about 35-40 milliseconds.
 
Old 07-18-2004, 10:56 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
yes, you can r/w descriptors freely from threads, that type of synchronization is handled by the kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Test thread (Ignore this thread) operatester General 2 07-07-2005 02:04 PM
[thread control suggestion] add a "solved" button that the thread starter can click atom LQ Suggestions & Feedback 3 03-24-2005 11:55 AM
Main thread sending notification to child thread rajesh_b Programming 1 09-22-2004 09:15 AM
configure qt thread issue (just compiled qt w/ -thread option) cleff Linux - Software 8 05-07-2004 11:11 PM
send parameter from thread to thread marek Programming 2 09-08-2003 05:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration