Re: TextWriter synchronized method
- From: Spam Catcher <spamhoneypot@xxxxxxxxxx>
- Date: Wed, 29 Aug 2007 04:14:32 GMT
"fniles" <fniles@xxxxxxxxxx> wrote in
news:emnkuKa6HHA.1188@xxxxxxxxxxxxxxxxxxxx:
If I use TextWriter synchronized method like below codes if another
thread is trying to write at the same time, what will happen ?
I believe it will block until the first thread releases the write.
Synchronized methods implement a simple synclock mechanism if I'm not
mistaken.
Will it
the 2nd thread request to write to the file be queued ? Will the 2nd
thread then stop processing other codes while waiting to write to this
file ?
Thank you.
Dim swLogOrig As StreamWriter
Dim swLog As TextWriter
swLogOrig = New StreamWriter(m_sLogFileName, True)
swLog = TextWriter.Synchronized(swLogOrig)
.
- References:
- TextWriter synchronized method
- From: fniles
- TextWriter synchronized method
- Prev by Date: Re: listview checked item
- Next by Date: Re: ***[SPAM]***
- Previous by thread: TextWriter synchronized method
- Next by thread: Fetch/pass Url to IE?
- Index(es):