Click here to Skip to main content
15,888,243 members
Home / Discussions / C#
   

C#

 
GeneralRe: copy constructor needed? Pin
Alvaro Mendez23-Sep-03 11:01
Alvaro Mendez23-Sep-03 11:01 
GeneralRe: copy constructor needed? Pin
Heath Stewart23-Sep-03 13:04
protectorHeath Stewart23-Sep-03 13:04 
GeneralWebservice over SSL with multiple servers Pin
solidstore23-Sep-03 1:14
solidstore23-Sep-03 1:14 
GeneralRe: Webservice over SSL with multiple servers Pin
Heath Stewart23-Sep-03 3:25
protectorHeath Stewart23-Sep-03 3:25 
GeneralRe: Webservice over SSL with multiple servers Pin
solidstore23-Sep-03 3:54
solidstore23-Sep-03 3:54 
GeneralRe: Webservice over SSL with multiple servers Pin
Heath Stewart23-Sep-03 4:34
protectorHeath Stewart23-Sep-03 4:34 
GeneralRe: Webservice over SSL with multiple servers Pin
Heath Stewart23-Sep-03 4:36
protectorHeath Stewart23-Sep-03 4:36 
GeneralNamed Mutex (I think) Pin
James Simpson23-Sep-03 0:52
James Simpson23-Sep-03 0:52 
Hi,

If I want to serialize access to different resorces can I use a Named Mutex?

eg: I want to serialize access to a folder from different threads, can I do the following

Mutex oMutex = new Mutex(sFolderSpec);

oMutex.WaitOne()

oMutex.ReleaseMutex();

then in a different thread, have a different instance of the mutex, but with the same name

Mutex oMutex = new Mutex(sFolderSpec)
oMutex.WaitOne()

oMutex.ReleaseMutex();

I guess what I am asking is, Can I create the mutex in the function where I want the lock and dispose of it afterwards, and any other calls the same function by a different thread will lock until its released - or do I need an instance already created and accessible to each thread?

Thanks, James




James Simpson
Web Developer
imebgo@hotmail.com
GeneralRe: Named Mutex (I think) Pin
Heath Stewart23-Sep-03 3:31
protectorHeath Stewart23-Sep-03 3:31 
GeneralRe: Named Mutex (I think) Pin
Blake Coverett23-Sep-03 6:14
Blake Coverett23-Sep-03 6:14 
Generalaspnet_wp.exe restarting unexpectedly Pin
solidstore22-Sep-03 23:52
solidstore22-Sep-03 23:52 
GeneralOutlook Automation and sending Bulk E-mail Pin
Braulio Dez22-Sep-03 23:44
Braulio Dez22-Sep-03 23:44 
GeneralTheoretical Question on object creation Pin
Rohde22-Sep-03 23:09
Rohde22-Sep-03 23:09 
GeneralRe: Theoretical Question on object creation Pin
shaunAustin22-Sep-03 23:16
shaunAustin22-Sep-03 23:16 
GeneralRe: Theoretical Question on object creation Pin
Rohde22-Sep-03 23:30
Rohde22-Sep-03 23:30 
GeneralRe: Theoretical Question on object creation Pin
Blake Coverett22-Sep-03 23:32
Blake Coverett22-Sep-03 23:32 
GeneralRe: Theoretical Question on object creation Pin
Blake Coverett22-Sep-03 23:30
Blake Coverett22-Sep-03 23:30 
QuestionHow do i convert an image to cursor? Pin
Gywox22-Sep-03 23:05
Gywox22-Sep-03 23:05 
GeneralChange User Windows Rights Pin
marsiglia22-Sep-03 22:54
marsiglia22-Sep-03 22:54 
GeneralRe: Change User Windows Rights Pin
shaunAustin22-Sep-03 23:22
shaunAustin22-Sep-03 23:22 
GeneralQuick boolean question: DataGrids.DataSource: multi datatables Pin
troels_sorensen22-Sep-03 22:44
troels_sorensen22-Sep-03 22:44 
Generalencode a path to binary and store to database Pin
M_|222-Sep-03 22:03
M_|222-Sep-03 22:03 
GeneralRe: encode a path to binary and store to database Pin
shaunAustin22-Sep-03 23:28
shaunAustin22-Sep-03 23:28 
GeneralDLL CAll Pin
anees8122-Sep-03 20:56
anees8122-Sep-03 20:56 
Questionhow to use c# to sned message to a mobile phone Pin
Jim Chan22-Sep-03 20:20
Jim Chan22-Sep-03 20:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.