473,698 Members | 1,877 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 1537
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
2389
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
2209
by: hazz | last post by:
is that possible from a C++ app? thank you. -Greg
2
1976
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
2053
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
5079
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
5742
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
1900
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
10226
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
2169
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
2708
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
8672
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
8600
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
9155
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
9018
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
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5859
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3038
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
2322
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.