Re: Delphi threading



Infact, i've just noticed if I put a sleep(200) after the first .Resume
in the main form:

NewThread.resume;
sleep(200);

This will now work. I'm wondering what in the world is going on. Is the
NewThread getting freed when it reaches the last end; of the clicked
button?

Strange Indeed. This probably won't be too hard to solve at all if
you've worked with threads before. Please take a looksie.

Thanks!

DCoder_ wrote:

Hmm.. for some reason the first example doesn't quite work. I've
checked the help and it seems like it should. I also copied and pasted
the example twice to make sure I wasn't doing anything silly:

http://eonclash.com/Tutorials/Multithreading/MartinHarvey1.1/Ch2.html#Code3

If you take a look at the two lins: "Here is the source of the form",
and "here is the source of the thread object". Just underneith "Our
first non-VCL thread". - I would appreciate if anyone who knows about
threads could tell me why this doesn't work.

It will compile fine, and the button is clickable without error. It
doesn't actually do anything though, and when you exit the app, you get
an error. Also, I found by placing showmessage() calls throughout the
code to try work out where it was at, it did infact work??

Thanks!


DCoder_ wrote:

Problem solved for future views:

http://eonclash.com/Tutorials/Multithreading/MartinHarvey1.1/ToC.html

Any other noteable sites though, please let me know.

Kind regards.

DCoder_ wrote:

Anyone know of a good guide to delphi threads? - I know there's this
site:

http://www.pergolesi.demon.co.uk/prog/threads/ToC.html

..which is down, so i'm viewing it through here:

http://web.archive.org/web/20041112062343/http://www.pergolesi.demon.co.uk/prog/threads/ToC.html

It seems excellent, but all the code hasn't been cached on the
web.archive.org... anyone have this saved at all??? Would really
appreciate it.

Kind regards,

DC.

.


Quantcast