Executing a Put, SetEvent not working in thread

Giganews Newsgroups
Subject: Executing a Put, SetEvent not working in thread
Posted by:  Jimmy Way (kosstamog…@gmail.com)
Date: Mon, 20 Jun 2005

Hello,

New to Indy and threading...

What would be a good way to make sure to catch if a IdFTP.put does not
hang?
I would like to check if Put is hung, then terminate the thread that it is
being executed in.

My approach was...
to spawn a thread to do a Put, and then do a Event1.WaitFor(10000) in the
main thread.

(In Thread)
Put(Source, Dest)
Event1.SetEvent  <--- never goes here??

Instead it times out and the event never gets set and the timer goes off..
Am I missing some deadlock situation here?

Thanks for your help,

-Jimmy

Replies