Re: Can't use TComponent in thread object?
- From: "brett" <account@xxxxxxxxx>
- Date: 23 Nov 2006 01:20:05 -0800
Shouldn't it execute on the Resume call? I create the thread suspended
so I can assign variables for the FTP class inside of TProgressThread.
In TProgressThread's Execute method, I start the FTP download. But
nothing is happening. The FTP works when I use it in the same Unit (no
multi threading). There must be some thing on the thread I missed to
get it going.
I found out why the thread wasn't executing. The Execute() method was
being called but then I quickly exited from it. In the thread class,
after the FTP object called its Receive() method to download, I quickly
destroyed the FTP object. That's why the exit was so fast. I was
hoping it would block with Resume() but I guess it didn't. This means
I need to be sure the FTP object doesn't leak after the thread is
destroyed.
Brett
.
- Follow-Ups:
- Re: Can't use TComponent in thread object?
- From: Rob Kennedy
- Re: Can't use TComponent in thread object?
- References:
- Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Jamie
- Re: Can't use TComponent in thread object?
- From: brett
- Re: Can't use TComponent in thread object?
- From: Nicholas Sherlock
- Re: Can't use TComponent in thread object?
- From: brett
- Can't use TComponent in thread object?
- Prev by Date: Re: More accurate Timerevent
- Next by Date: Re: More accurate Timerevent
- Previous by thread: Re: Can't use TComponent in thread object?
- Next by thread: Re: Can't use TComponent in thread object?
- Index(es):
Relevant Pages
|