![]() |
Re: Wie synchroniziere ich mehrere Threads richtig
Eine Ursache für das Einfrieren dürfte sein, dass die Anforderungen durch Synchronize mit höherer Priorität bearbeitet werden als sonstige Windowsnachrichten. Da bei 50 Threads die ständig Synchronize aufrufen eigentlich immer eine Anforderng vorliegt, werden Windowsnachrichten nicht mehr verarbeitet.
Auszug aus Unit Forms:
Delphi-Quellcode:
procedure TApplication.Idle(const Msg: TMsg);
{...} {$IFDEF MSWINDOWS} if (GetCurrentThreadID = MainThreadID) and CheckSynchronize then {$ENDIF} {$IFDEF LINUX} if (Libc.GetCurrentThreadID = MainThreadID) and CheckSynchronize then {$ENDIF} Done := False; if Done then WaitMessage; end; |
Re: Wie synchroniziere ich mehrere Threads richtig
Danke für die Erklärung. Das verstehe ich
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:19 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz