Re: thead security



seawind wrote:
HI all:
Call poll() function at two threads, and the important is the two
threads are waitting for the same socket descriptor . one of them is
set POLLIN , the other is set POLLOUT. What i want to know is whether
i should protect the socket descriptor by using lock. thanks advance


That might be a better question for comp.programming.threads.

--
Rosetta Code -- Building a Rosetta Stone for Programmers
http://rosettacode.org
.



Relevant Pages

  • thead security
    ... Call poll() function at two threads, and the important is the two ... threads are waitting for the same socket descriptor. ... set POLLIN, ... i should protect the socket descriptor by using lock. ...
    (comp.os.linux.misc)
  • Re: thead security
    ... threads are waitting for the same socket descriptor. ... set POLLIN, ... i should protect the socket descriptor by using lock. ... No need to do any locking, as long as you understand what you're ...
    (comp.os.linux.misc)
  • Re: thead security
    ... threads are waitting for the same socket descriptor. ... set POLLIN, ... i should protect the socket descriptor by using lock. ... As long as you understand the basic concepts of thread programming and logic, and as long as you know how to properly handle any exception or error conditions, no locking is required. ...
    (comp.os.linux.misc)