Click here to Skip to main content
15,896,207 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: NI Measurement Studio question Pin
Dave Kreskowiak6-Feb-09 19:04
mveDave Kreskowiak6-Feb-09 19:04 
GeneralRe: NI Measurement Studio question Pin
Nick Alexeev6-Feb-09 19:26
professionalNick Alexeev6-Feb-09 19:26 
GeneralRe: NI Measurement Studio question Pin
Dave Kreskowiak6-Feb-09 22:45
mveDave Kreskowiak6-Feb-09 22:45 
GeneralRe: NI Measurement Studio question Pin
Nick Alexeev7-Feb-09 10:28
professionalNick Alexeev7-Feb-09 10:28 
QuestionStreamwriter and thread safety Pin
NeilPrice6-Feb-09 9:50
NeilPrice6-Feb-09 9:50 
AnswerRe: Streamwriter and thread safety Pin
Christian Graus6-Feb-09 10:27
protectorChristian Graus6-Feb-09 10:27 
GeneralRe: Streamwriter and thread safety Pin
NeilPrice6-Feb-09 10:35
NeilPrice6-Feb-09 10:35 
GeneralRe: Streamwriter and thread safety Pin
Dave Kreskowiak6-Feb-09 11:12
mveDave Kreskowiak6-Feb-09 11:12 
NeilPrice wrote:
it's still running to all intents and purposes just hanging which is what was leading me to wonder if thread contention could be coming into play.


It's a definite possibility. Like Christian said, I'd wrap the LogSomething in a SyncLock to keep multiple threads from writing to the log at the same time. Also, since it sounds like your logging LOTS of information, I'd open the file in the first call to LogSomething and keep it open until the app closes. You can still look at the log file while the app is running, or file is open, in Notepad or some other quick'n'dirty editor that doesn't lock the file itself.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Streamwriter and thread safety Pin
NeilPrice6-Feb-09 11:28
NeilPrice6-Feb-09 11:28 
GeneralRe: Streamwriter and thread safety Pin
Luc Pattyn6-Feb-09 11:41
sitebuilderLuc Pattyn6-Feb-09 11:41 
QuestionTextbox prblem Pin
-kikica0512-6-Feb-09 9:09
-kikica0512-6-Feb-09 9:09 
GeneralRe: Textbox prblem Pin
Luc Pattyn6-Feb-09 9:26
sitebuilderLuc Pattyn6-Feb-09 9:26 
GeneralRe: Textbox prblem Pin
-kikica0512-6-Feb-09 19:29
-kikica0512-6-Feb-09 19:29 
GeneralRe: Textbox prblemsta Pin
Luc Pattyn7-Feb-09 3:16
sitebuilderLuc Pattyn7-Feb-09 3:16 
AnswerRe: Textbox prblem [modified] Pin
Samir Ibrahim7-Feb-09 7:28
Samir Ibrahim7-Feb-09 7:28 
Question[Message Deleted] Pin
spruha3696-Feb-09 3:08
spruha3696-Feb-09 3:08 
AnswerRe: searching all types of files in all drives Pin
Dave Kreskowiak6-Feb-09 3:45
mveDave Kreskowiak6-Feb-09 3:45 
AnswerRe: searching all types of files in all drives Pin
Christian Graus6-Feb-09 10:25
protectorChristian Graus6-Feb-09 10:25 
General[Message Deleted] Pin
spruha3696-Feb-09 15:06
spruha3696-Feb-09 15:06 
GeneralRe: searching all types of files in all drives Pin
Dave Kreskowiak6-Feb-09 18:59
mveDave Kreskowiak6-Feb-09 18:59 
GeneralRe: searching all types of files in all drives Pin
Samir Ibrahim7-Feb-09 6:50
Samir Ibrahim7-Feb-09 6:50 
GeneralRe: searching all types of files in all drives Pin
Dave Kreskowiak7-Feb-09 9:02
mveDave Kreskowiak7-Feb-09 9:02 
General[Message Deleted] Pin
spruha3698-Feb-09 19:00
spruha3698-Feb-09 19:00 
GeneralRe: searching all types of files in all drives Pin
Mycroft Holmes8-Feb-09 21:31
professionalMycroft Holmes8-Feb-09 21:31 
GeneralRe: searching all types of files in all drives Pin
Dave Kreskowiak9-Feb-09 1:48
mveDave Kreskowiak9-Feb-09 1:48 

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.