473,796 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Suggestion for C#

I have a suggestion for C#
I would like reader/writer locks to be built in to the language.
When you want to aquire a loct on an object o you write
lock(o)
{
...//critical region
}

I would like to be able to write:
readlock(o)
{
...//critical region that only reads shared data
}

Behind the scenes, the first time readlock(o) was called, the locking
mechanism on o would be upgraded to a reader/writer lock and any active,
queued or future locks on o acqired by using lock(o) would become writer
locks.
That way there would be no difference for the programmer between usind a
reader/write lock and a normal lock, all you would need to know would be
that if you want to read and write shared data you use lock(o) and if you
only want to read shared data you just use readlock(o).

It may be feasible to downgrade the reader/writer lock to a normal lock
again if only lock(o) has been used for a long time with no readlock(o)'s
beeing called.

Reader/writer locks are very common and this approach would not force the
programmer to choose between a normal lock or a reader/writer lock, they
would be the same. Furthermore with my suggestion there would be no need for
creating a reader/writer lock object and creating try finally blocks etc.
The syntax is much easier to use.

If this is not the right place to post my suggestion, where do I send my
suggestion?

Kind Regards,
Allan Ebdrup
May 31 '07
20 2193
Hi Allan,

I would recommend you to submit a suggestion at the link below:
https://connect.microsoft.com/VisualStudio

Our product team will follow up with your suggestion, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 4 '07 #21

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

Similar topics

11
2081
by: John Wellesz | last post by:
Hello, It would be great if there was an option to tell PHP to let the user manage all the HTTP headers instead of sending what it thinks is good for the programmer... For example when you write: header("Status: 200 OK"); header("Location: /my_internal_redirected_page.php");
5
1937
by: John | last post by:
Hi: I'd like to implement a simple map, which is a 2-D plane with many points, e.g., 100. The points are not evenly distributed, i.e., some points may have two neighbor points; some may have 5 or 6 neighbor points. Could anyone suggest me a data structure for it. Thanks in advance. John
10
2625
by: Paulo Jan | last post by:
Hi all: Let's say I'm designing a database (Postgres 7.3) with a list of all email accounts in a certain server: CREATE TABLE emails ( clienteid INT4, direccion VARCHAR(512) PRIMARY KEY, login varchar(128) NOT NULL,
7
1973
by: J.Marsch | last post by:
I don't know whether this is the appropriate place to give product feedback, but here goes: I would love to see some kind of diagnostic to let me know when implicit boxing has occurred. We have had a few instances where one developer or another was working on code, and did not realize that by passing their value type to a method that accepted an object parameter (or in many cases, a delegate).
2
1202
by: vinay | last post by:
I have a scenario, need your suggestion.. Our clients are already using the forms authentication where we check the User/Pwd from SQL svr Database. We also have some SETTINGS for the user saved in the database(helps us to restrict the user access some things) . We wanted to implement AD authentication for the same and also keep the existing SQL SVr User DB. My Q would be how to MAP the LDAP user to the SQL svr User, so we can get
13
1631
by: sandeep chandra | last post by:
Hey guys, I am new to this group.. i never know wot s going on in this group.. but wot made be brought here is cpp.. guys am currently a part of onw reaserch ... am new to everything.. i can prog in c and a bit in cpp.. to say ..am a fair programmer... there is a new problem in my research work.. which if solved , gives me a gud tool to develop my prog in a much better way.. lemme describe my prob... i have a routine in...
17
1924
by: Jedrzej Miadowicz | last post by:
I recently (re)discovered data binding in Windows Forms thanks to its advances in Visual Studio 2005. As I looked a little deeper, however, I realize that it still suffers from an irksome tendency to stick a whole bunch of literal strings in my code. Quite frankly, I consider them a plague imposed on developers by the RAD designers that come with Visual Studio. The problem with using literal strings to refer to controls, data sources,...
4
1212
by: John Salerno | last post by:
I apologize for the slightly off-topic nature, but I thought I'd just throw this out there for anyone working on text editors or IDEs with auto-completion. I think it should be a feature, when an item is selected for auto-completion in a drop-down box, that pressing the spacebar (in addition to tab or enter) will automatically finish the word and add a space. This is how Microsoft's new IDEs for .NET work, and I found it very helpful to...
0
9685
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
9531
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
10459
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
10237
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
10018
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
6795
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();...
1
4120
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
3735
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.