Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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
 
Old May 5th, 2005, 09:14 PM
Registered User
 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gunx
Default communiation between thread

hi there good ppl ,

need to know, is it possible 2 threads communicate each other ? up to this point, i 'm still searching for the solution ... link/URL forwarded much apprreciated .. thanks ...

 
Old May 6th, 2005, 02:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

between two threads of the same process? Can you be more specific? How do you create your threads (if it is you who created them?)
Marco
 
Old May 9th, 2005, 03:41 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

There’s always the file system: write the data from 1 thread to the disc, and compose that which is running on the other thread to poll the disc to see if there is a “message” there for it.
 
Old May 10th, 2005, 03:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian,
using a file for inter process communication is a risky business, because it is not possible to synchronize the reading and writing. The only way is to 'lock' the file, but then the two threads must handle errors on file opening, and if one application crashes leaves the file locked. And if both threads need to write into the file, that is a big nightmare (I have been there...)
Not that cannot be done, but only for short messages, and usually as a one-way only (one thread reads and the other writes)
Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread was being aborted acko ASP.NET 1.0 and 1.1 Basics 15 March 26th, 2014 02:52 AM
Which Thread to use and How peace2007 ASP.NET 1.0 and 1.1 Professional 0 September 23rd, 2007 03:24 AM
a Thread argument beccali Java Basics 1 February 21st, 2007 06:12 AM
Thread was being aborted sohailmaroof ASP.NET 1.0 and 1.1 Basics 2 January 13th, 2007 02:25 AM
Thread portability rax Linux 0 September 3rd, 2004 06:54 AM





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