Register  |  Login
Search:      
February 05, 2012
Forum Minimize
 
  NMUG Discussion Forums  .NET Language D...  C#  Multithreading and File Resources
Disabled Previous
 
Next Next
New Post 11/12/2008 8:56 AM
User is offline Todd
2 posts
Posts are coming!


Multithreading and File Resources 

So I feel I've picked up some of the basics of .net, but I'm now working on multithreading.  I feel that this is a concept that is going to elude me for a while.  I'm reading Concurrent programming on Windows over at safari at the moment, and already it has helped. 

Does anyone here have any insight beyond abstract tutorials on practical applications of Multithreaded access to a directory structure for file I/O?

 
New Post 11/20/2008 3:23 PM
User is offline Ethan
3 posts
www.coultertechnologies.com
Posts are coming!


Re: Multithreading and File Resources 

What kind of insight are you looking for?  I guess some obvious things are you want to be careful with your thread and not go crazy creating them.  To many threads = slower computer.  They are very pracitcal if you are going to be waiting for a file to show up.  Let us know what you want to know and we'll see if we can't anwser your questions.

 
New Post 11/24/2008 5:31 PM
User is offline Dave
3 posts
Posts are coming!


Re: Multithreading and File Resources 
Todd, Check out http://www.albahari.com/threading/. This is, perhaps, one of the most usefull introductions I'm found. He's the author of "C# 3.0 In a Nutshell" which contains more current information. However, the price of the original material is perfect. Dave
 
New Post 1/10/2009 6:40 PM
User is offline Morgan Gangwere
3 posts
sonof.bandit.name
Posts are coming!


Re: Multithreading and File Resources 
Modified By SuperUser Account  on 1/11/2009 3:56:02 PM)

Some might notice that there's a wonderful thing called a BackgroundWorker. it lets you do stuff in the background.
Here's how it works:
 


BackgroundWorker bw = new BackgroundWorker();
bw.doWork += new EventHandler .... **STANDARD EVENT HANLDER FOR doWork**

...


the doWork event is thrown when a function of the same name is run. On another note, you can also pass a function to do the work to handle the doWork function. GooOooOOogle is your freind

 
New Post 1/11/2009 2:36 PM
User is offline Morgan Gangwere
3 posts
sonof.bandit.name
Posts are coming!


Re: Multithreading and File Resources 
Modified By SuperUser Account  on 1/11/2009 3:56:39 PM)

In other notes, the Bad Words specifier needs to be fixed.
the regular expression shouldnt be "xxx" it should be "\bxxx\b" so that only the word "xxx" would be filtered, not "bxxx" or some such. Example: pass gets filtered because a particular 3 letter word gets replaced with @@@ (see above)
Fix for this: wherever the regular expression for bad word filtering is found, it instead of doing a regex for "*"+badWord+"*" it does one for "\b"+badWord+"\b" ... Just a thought ...

 
New Post 1/11/2009 4:04 PM
User is offline SuperUser Account
1 posts
Posts are coming!


Re: Multithreading and File Resources 

Thanks for the post Morgan.  The word filter looks for words based on plain text not based on regular expressions.  In the admin section there is no place to insert regular expressions.  This is a core DNN module and maybe they will fix it in a future release.  I have removed the specific word that caused problems with the word pass. 

 

Thanks

 
Disabled Previous
 
Next Next
  NMUG Discussion Forums  .NET Language D...  C#  Multithreading and File Resources
Print  
Our Sponsors Minimize
Print