Well ok this should be only an example.
When I change my code to this:
procedure test.execute();
begin
Synchronize(@CallMainThread);
end;
procedure test.CallMainThread();
begin
showmessage('hey');
end;
the behavior doesn't change. The messagebox is called only once although I press the button 2 or more times.