Solved

Threading

Posted on 2000-03-24
3
237 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

717 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