AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi LeaveCriticalSection: Warum das nachfolgenden sleep(0)?
Thema durchsuchen
Ansicht
Themen-Optionen

LeaveCriticalSection: Warum das nachfolgenden sleep(0)?

Ein Thema von Nogge · begonnen am 9. Apr 2006 · letzter Beitrag vom 1. Mai 2015
 
Der schöne Günther

Registriert seit: 6. Mär 2013
6.196 Beiträge
 
Delphi 10 Seattle Enterprise
 
#3

AW: LeaveCriticalSection: Warum das nachfolgenden sleep(0)?

  Alt 24. Apr 2015, 12:34
Delphi 2, Windows NT. Ernsthaft?

Sleep macht nichts anderes als die WinApi-Routine "Sleep" aufzurufen.

In der Doku dazu steht:´
Zitat:
A value of zero causes the thread to relinquish the remainder of its time slice to any other thread that is ready to run. If there are no other threads ready to run, the function returns immediately, and the thread continues execution.

Windows XP: A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. This behavior changed starting with Windows Server 2003.
Also bis WinXP tut es entweder das, was TThread.Yield() macht, oder auch gar nichts. Je nachdem wie es lustig ist.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:10 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