Hi, I'm doing an IT degree at university, and my lecturer's do not teach
m$ technologies. I was wondering if anyone could point me to the
implementation of mutex's and semaphores in .net? Or the microsoft
equivalent of them. 5 2621
Steven,
If you want to see the actual code for the implementation of Mutex,
Semaphore, etc. , download yourself a copy of Lutz Roeder's free Reflector
product, Load MsCorlib, and use the built - in disassembler to see the actual
code in your favorite language.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Steven Spencer" wrote: Hi, I'm doing an IT degree at university, and my lecturer's do not teach m$ technologies. I was wondering if anyone could point me to the implementation of mutex's and semaphores in .net? Or the microsoft equivalent of them.
I'm afraid this will not work for him, since they are implemented in .NET
framework by calling WinAPI.
And Semaphore class is in System.dll, not in mscorlib.
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:72******** *************** ***********@mic rosoft.com... Steven, If you want to see the actual code for the implementation of Mutex, Semaphore, etc. , download yourself a copy of Lutz Roeder's free Reflector product, Load MsCorlib, and use the built - in disassembler to see the actual code in your favorite language. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Steven Spencer" wrote:
Hi, I'm doing an IT degree at university, and my lecturer's do not teach m$ technologies. I was wondering if anyone could point me to the implementation of mutex's and semaphores in .net? Or the microsoft equivalent of them.
Yes, Semaphore is in System.Dll, and Mutex is in MsCorLib. And even though
WinAPI calls are used, you can still decompile to C# for example and examine
quite easily how everything is implemented, including any DLLImport
signatures.
Peter
--
Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
"Lebesgue" wrote: I'm afraid this will not work for him, since they are implemented in .NET framework by calling WinAPI. And Semaphore class is in System.dll, not in mscorlib.
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message news:72******** *************** ***********@mic rosoft.com... Steven, If you want to see the actual code for the implementation of Mutex, Semaphore, etc. , download yourself a copy of Lutz Roeder's free Reflector product, Load MsCorlib, and use the built - in disassembler to see the actual code in your favorite language. Peter
-- Co-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com
"Steven Spencer" wrote:
Hi, I'm doing an IT degree at university, and my lecturer's do not teach m$ technologies. I was wondering if anyone could point me to the implementation of mutex's and semaphores in .net? Or the microsoft equivalent of them.
Here is one I did before 2.0 was out: http://www.codeproject.com/csharp/Di...sp#xx1205311xx
--
William Stacey [MVP]
"Steven Spencer" <Sp****@spinalo gic.ws> wrote in message
news:44******** @dnews.tpgi.com .au...
| Hi, I'm doing an IT degree at university, and my lecturer's do not teach
| m$ technologies. I was wondering if anyone could point me to the
| implementation of mutex's and semaphores in .net? Or the microsoft
| equivalent of them. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nish |
last post by:
Hi,
I have some code, to which I added usage of posix semaphores. I am
working on a solaris platform. After doing that, my process becomes
unkillable, that is it will not terminate if sent a SIGTERM signal.
I am not ignoring that signal. Just adding this code related to
semaphores seems to be causing this problem. None of my threads is
sleeping indefinitely on any semaphore wait.
Any help will be appreciated.
If this is not the...
|
by: Mehmet Turker |
last post by:
Hi;
In a research project, I want to use shared memory with semaphores.
First I have to create an environment for interprocess messaging. I'm
thinking of having a main process which creates a big shared memory
and manage all messages which are sent by objects inside the
environment. Is this method effective for a high loaded messaging
area? I heard about using ports can cause loss of data.
And, is it ok to have a main process which will...
|
by: schneider jp |
last post by:
Hi everybody
For a project of system programming, we need to use semaphores, but i got
some pbs...
when I compile, i get perror with sem_open("machin", O_CREAT, 0666, 0); and
perror says function not implemented ... on a sun, i get perror : Invalid
argument...
another question : what's the max number of semaphores a process can
create??
|
by: FiLH |
last post by:
Hello,
I would like to know if posix semaphores are inter processes or just
semaphores for threads inside the same process.
I have not seen it defined in the posix specification I have found, but
I have maybe missed something.
Thanks in advance.
|
by: jinksk |
last post by:
I have a C# application and a VB6 application that need to share a dialup
connection to the internet. Don't ask why, this is one of those corporate "do
or die" things.
The only way I can see to do this is by using the combination of a MUTEX to
create a Cross-application Singleton for the Dialing operation and a Named
Semphore that can keep a count of how many processes are currently sharing
the connection from the client's workstation...
| |
by: Edwin New |
last post by:
I have a requirement to run two separate postmasters on the one machine. It
looks like they compete for resources (semaphores) so won't run
concurrently.
I compiled twice, specifying different ports and home directories:
./configure --with-java --with-pgport=6100
--prefix=/usr/local/teprpg01
make
etc...
|
by: arne |
last post by:
Hi,
I am using Perl ithreads. The threads I create shall access a shared hash.
In order to control access to the hash, I would like to use a semaphore. (BTW, does the hash need the protection at all if I can make sure that all threads use different keys?)
Semaphores in Perl are provided by the (obsolete?) "Thread" module, which has been replaced by the "threads" module in recent versions. But in the latter, there are only locks, no...
|
by: The Advocate |
last post by:
Hello, how can we implement semaphores using monitors. I got how we can do it the way round. I did alot of search but couldnt find any implementation of semaphores using monitors,. Can anyone help me on this plz Thank you!
|
by: davidcollins001 |
last post by:
Hi,
Firstly please excuse the long ramblingness. I need some conceptual help, I am trying to make two programs that are exactly the same but take it in turns to execute something, so the output looks something like the following:
setup semaphores, etc
.
.
proc 1 doing first thing
proc 2 doing next thing
|
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,...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |