?
Solved

Threading

Posted on 2000-03-24
3
Medium Priority
?
238 Views
Last Modified: 2010-05-02
I have to create a set of threads (say 5 threads)to which I should be able to pass queries.Each thread should be able
to process a single query.once a thread has finished its process I should be able to pass next query. AllThese threads which I'm creating should be in
single exe and the query should be passed from different exe.How to do this?
note: if i make any thing exe.that
default will be one thread.i don't
want this extra thread.
0
Comment
Question by:rose15
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
wpsjr1 earned 50 total points
ID: 2657073
If you are using VB5 SP3 its possible to use CreateThread API.  However, this might not be a good idea ( see the article on threading by Daniel Appleman at http://www.desaware.com ) Other possibilities are an AX EXE set for Thread per object, or Matt Curlands sample on vbaccelerator at: http://vbaccelerator.com/codelib/tlb/threadapi_source.zip

It looks like Threading will become much easier when VB7 comes out.  I can't wait!  :)

Good Luck.

Paul

p.s.  I have a BAS module that allows Thread creation in VB5 SP3 if you like.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2686656
Threading without rocket science.

http://homepage.eircom.net/~carafa/TEMP/AWXB.zip 

Explanation / order of compilation
AWXB02MSG.exe - (ActiveX.exe, one thread for all objects) Messaging application that will take care of sending messages between spawned threads and the main application.
AWXB01Thread.dll - The code that will be run in each separate thread
AWXB04Starter.exe - (ActiveX.exe, one thread per object) Application that will take care of creating each new thread.
AWXB03Test.exe - Standard exe. Main application / test bed.

Hope this helps.

0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2699266
Oh great stuff... Why exactly did wpsjr1 deserve a "D"?

If you're going to give someone a shitty grade you could at least explain yourself.

And I'm sure that if you'd given wpsjr1 a chance, wpsjr1 would have been happy to explain the details of the proposed solution to your problem.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question