473,722 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

thread security

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

Feb 7 '07 #1
1 1539
Surfy wu 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
Wrong newsgroup. You should probably post to the newsgroup for your
OS or your compiler/library. C++ language does not define 'poll' or
"threads" or "socket descriptor".

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Feb 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2391
by: John Wood \( http://spaces.msn.com/members/johnwoo | last post by:
Has anyone ever gotten these methods to run? Anyone know exactly what they're for? Conceptually it seems it might be possible to use these methods to implement simulated-fibers in .net... but I can't seem to find any real documentation on them. -- John Wood Blog: http://spaces.msn.com/members/johnwood/
11
2213
by: hazz | last post by:
is that possible from a C++ app? thank you. -Greg
2
1978
by: C | last post by:
All, I am trying to run my BO in a separate thread, so that I can give the user a visual of the status of my process in a asp.net page/site. All works fine, IF the ASPNET user has admin rights, (in order to do the tasks in the BO). Now, I impersonate the admin user in the web.config after removing his admin rights from my machine, then I ran the code below, in a page_load. The Name of the security principal is the administrator I have...
3
2056
by: DS | last post by:
I try to generate a excel workbook using Excel object in ASP.NET program. When I implement the Excel workbook generation with out a thread it works fine. When I wrap all the excel generation process inside a method, and spin this method in a different thread I get the following error: "An unhandled exception of type 'System.UnauthorizedAccessException' occurred in Unknown Module. Additional information: Access is denied." I am stuck...
13
5088
by: Bob Day | last post by:
Using vs2003, vb.net I start a thread, giving it a name before start. Code snippet: 'give each thread a unique name (for later identification) Trunk_Thread.Name = "Trunk_0_Thread" ' allow only 1 thread per line Trunk_Thread.ApartmentState = ApartmentState.STA
5
5745
by: Brian | last post by:
I have an file based asp.net application the creates a thread to do some background printing. It works fine but when the application is deployed on a web server, the following error occurs in the thread when it accesses SQL: Login failed for user ''. The user is not associated with a trusted SQL Server connection. Note the blank user. It seems that the new thread does not have the credentials but looking at "Thread.CurrentPrincipal",...
2
1903
by: phil | last post by:
My ASP.NET application sets up impersonate in the config file: <identity impersonate="true" userName="m1\aspuser" password="xyz" / Later, within my application, I create a thread: x= New processor Dim ts As New ThreadStart(AddressOf x.start) Dim thread As New Thread(ts) thread.Start()
18
10235
by: =?Utf-8?B?VGhlU2lsdmVySGFtbWVy?= | last post by:
Because C# has no native SSH class, I am using SharpSSH. Sometimes, for reasons I do not know, a Connect call will totally lock up the thread and never return. I am sure it has something to do with weirdness going on with the server I am talking to. Anyhow, this locked up state happens once in a while (maybe once per day) and I can't figure out how to deal with the locked up thread. If I issue a Thread.Abort() the exception never...
9
2175
by: davids18 | last post by:
Hello, I have a web service method that need to create a thread that does some work in the background so the main process can go on. The work in the background is a simple insert into a database. If I try this code in an application console works, but when I try this code inside the asmx page doesnt work. I dont get any error, just the data are not inserted into the database. Here is my code: <%@ WebService Language="VB"...
16
2715
by: akshaycjoshi | last post by:
Consider the following code in which i add nodes to a treeview control by reading an MS Access database. Obviously, if I execute in a seperate thread I will get exception about control accessed from a thread other than the one in which it is created. Now whenever I am adding one node to the tree I could marshel it to the GUI thread like this void addnode(string textofnode) { } The problem is that I have got some nodes which are...
0
8863
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9238
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6681
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.