On 2002-10-22 21.08, Joseph J. Strout wrote:
> At 9:00 PM +0200 10/22/02, Håkan Liljegren wrote:
>
>> My ListBox class also has a "filler" property and when I want to stop the
>> thread I just set that property to nil, which will spring the destructor of
>> the thread.
>
> Not if the thread is running. A thread locks itself until its Run is
> complete.
>
Well it do quits...
...when I drop into the exception handler I clean up and then of course the
run *is* complete. At least in one way...
What do you mean by "locks itself"? Does that imply that I can't call any
other routine in my thread-class?
>> But is it safe to kind of force-quit a thread in this manner?
> You can't force-quit a thread in that manner. Either you've found a
> bug, or your test isn't showing you what you think it is.
Well, actually I don't think this is really a force-quit. What I do is that
I cause an exception to handle within the run event and then let that
exception be my door out...
.... So if this *is* a bug then I think it's a nice one ;-)
:-Håkan
---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
.
|