2011/9/22 Krzysztof <dib...@wp.pl>:
> Hi,
>
> I have some object which create and execute thread. This thread do some http
> requests (synapse) and send progress to the object by
> Application.QueueAsyncCall(MyObject.MyHandleProc, AProgress), it is designed
> for multithread - have critical section, so I can call it from thread to
> main thread. But I have problem which occurs some times. In object
> destructor I clear async queue by calling Application.RemoveAsyncCalls
> (which is thread safe too). But if thread waiting in critical section
> (because main thread block it with RemoveAsyncCalls) then after main thread
> leave critical section, thread post progress but should not because object
> is going to destroy. This occurs Access violation in ProcessAsyncCallQueue
> because method MyObject.MyHandleProc doesn't exists any more, this is only
> pointer to that method. Can ProcessAsyncCallQueue some how check if target
> still exists?
>
> Regards
>

Why not destroy it with Queued call too?

-Flávio

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to