?
Solved

Multithreading inDelphi

Posted on 2000-02-18
8
Medium Priority
?
184 Views
Last Modified: 2010-04-04
How would you create threads say for scanning for a keypress and something else. I am working on a SCSI app and need to be able to test and interrupt the test at any time. The SRB_ABORT and SRB_EXEC need to run simultaneously. In other words, start reading a disk, then if I choose, press ESC and stop (SRB_ABORT). Right now, if I start a process (Reads, for example) the process locks me out until it completes, so I can not abort. Code snippets please.
0
Comment
Question by:evansj
[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
8 Comments
 
LVL 5

Expert Comment

by:TheNeil
ID: 2535645
Try adding Application.ProcessMessages to your code at regular intervals (or in a loop if that's what you're using). You can then process key presses, set flags, and drop out if you need to. Far simpler than messing around with threads

The Neil
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2535677
Why not looking at the demo in delphi?

{$Delphi}\Demos\threads

Zif
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 600 total points
ID: 2535719
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:niknoxe
ID: 2537697
If this hadn't helped you, let me know. Application.ProcessMessages brings you on the right way, but there is a lot more to get them responding!
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2539301
listenning
0
 

Author Comment

by:evansj
ID: 2554499
I'm also reissuing this question for TheNeil so he can get points also.
0
 
LVL 5

Expert Comment

by:TheNeil
ID: 2554587
Thanks for the points - don't know if I deserve but you won't hear any complaints (well not from me).

The Neil
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2555261
Thanks for the points - I only hope you have found what you need, because otherwise this was a waste of points. zif.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

765 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