Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #11 (permalink)  
Old April 23rd, 2007, 07:25 AM
Registered User
Join Date: Apr 2007
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

I see your point.

A little background might clarify some things for both of us. This application is being used to control a vision inspection system. The UI has three displays for each part inspected and numerous text boxes and labels for counts and pass/fail indicators. Because this system will be implemented on the production floor, it needs to be assumed that it will inspect parts indefinitely (or until the user terminates the inspection). This is what created my need for threading, running the infinite inspection loop while allowing the user the control to kill it when needed. As you can imagine, the interface has to update for every part.

I may just be being overly cautious, but I want to make sure that the worker thread is not updating variables that the invoked thread is using to update controls on the UI (the main danger with threading, right?).

Time is important as I have only about four seconds between parts, but it is not the reason for threading. The sleep command is a quick fix, but I'd rather have more robust programming that doesn't use a subjective number as the milliseconds parameter is.

It's entirely possible that I'm missing something in threading philosophy. Feel free to correct me on any of this.


  #12 (permalink)  
Old April 23rd, 2007, 07:46 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Sounds like an interesting project.

Is there something that triggers the start of a single inspection? It seems like this would simplify things greatly. From what I understand, you are continuously looping through this logic and, thus, possible running extra passes that aren't needed. I would imagine that you would do everything possible to NOT have anything that would stop code execution for something running on a production line.


Similar Threads
Thread Thread Starter Forum Replies Last Post
error handling while multi threading minotaur01 General .NET 0 August 9th, 2007 05:55 PM
Multi-threading issue Bill Crawley Pro Visual Basic 2005 0 March 21st, 2007 06:19 AM
multi threading rashid.shaban@gmail.com BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 26th, 2007 11:48 PM
Multi threading, web service requests sheel VS.NET 2002/2003 2 January 12th, 2007 04:39 AM
ASP.NET Multi-Threading, is there such a thing? flyin General .NET 1 April 23rd, 2004 03:05 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.