Solved

Multithreading inDelphi

Posted on 2000-02-18
8
181 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 200 total points
ID: 2535719
0
Independent Software Vendors: 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb download file link ? 1 168
FMX and jaudiotracker playing memory stream 29 98
Delphi...Split view - idea? 1 117
Delphi: making a BW image transparent 10 96
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

696 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