melchiorre caruso wrote:
> Al Boldi wrote:
> > melchiorre caruso wrote:
> >> if I use in execute method the source
> >>
> >> "if Assigned (FMethod) then
> >> FMethod;"
> >>
> >> instead of
> >>
> >> "if Assigned (FMethod) then
> >> Synchronize(FMethod);"
> >>
> >> the method fMethod is called but not synchronized. Then the application
> >> closes
> >
> > What does GetCurrentThreadID and MainThreadID give you from your lib and
> > app and thread?
>
> These are the results:
>
> From TTestLibrary.TestBtnClick procedure
>
> MainThreadID = 3712
> CurrentThreadId = 3712
>
> From thread2lib.CreateMyThread function
>
> MainThreadID = 3712
> CurrentThreadId = 3712
>
> From TMyThread.Execute
>
> MainThreadID = 3712
> CurrentThreadId = 3280
I tried your example on linux with fpc 2.0.2, and it works:
============
lib loaded
Library MainThreadID 16384
Library CurrentThreadID 16384
Thread MainThreadID 16384
Thread CurrentThreadID 16386
TestForm MainThreadID 16384
TestForm CurrentThreadId 16384
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
Synchronize call work
OnTerminate event work
============
So it's either an fpc or windows issue.
Can you statically link it on windows, and see if it make a difference?
Thanks!
--
Al
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives