Denken Sie jedoch daran, dass asynchroner Code nicht den Threadpool ersetzt.
Bear in mind that asynchronous code does not replace the thread pool.
Asynchroner Code ermöglicht der Anwendung, den Threadpool optimal zu nutzen.
Asynchronous code allows your application to make optimum use of the thread pool.
Die Anzahl der Threads im Threadpool für die Verarbeitung eingehender Anforderungen.
The number of threads in the thread pool to handle incoming requests.
Der Threadpool wird mit anderen Diensten gemeinsam verwendet.
The thread pool is shared with other services.
In dieser Situation werden den ersten beiden Anforderungen Threads aus dem Threadpool zugewiesen.
In this situation, the first two requests are assigned threads from the thread pool.
Ein Codebeispiel finden Sie unter Beispiel für Threadpool.
See Thread pool sample for a code example.
Wenn die Anforderung abgeschlossen ist, wird dieser Thread erneut zum Threadpool zurückgegeben.
When the request is completed, that thread is again returned to the thread pool.
Wiederholte Vorkommen dieser Situation führen dazu, dass Threads grundlos besetzt bleiben, wodurch der Threadpool ausgeschöpft wird.
Repeated occurrences of this situation causes threads to needlessly remain occupied, causing the thread pool to exhaust.
Auch wenn sich der Thread im Threadpool befindet, ist er nicht mehr mit dieser Anforderung verbunden.
While the thread is in the thread pool, it's no longer associated with that request.
Diese Einstellung gibt die maximale Anzahl von Threads an, die das Modul für den Threadpool verwendet.
This setting specifies the maximum number of threads that are used by the engine for the thread pool.
Dadurch gelangt der Anforderungsthread zurück zum Threadpool, bis der Aufruf zur externen Ressource zurückkommt.
This returns the request thread to the thread pool until the call to the external resource returns.
Durch diese Funktionen wird die parallele Entwicklung vereinfacht, sodass sie effizienten, differenzierten und skalierbaren parallelen Code in einer natürlichen Sprache schreiben können, ohne direkt mit Threads oder dem Threadpool arbeiten zu müssen.
These features simplify parallel development so that you can write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool.
Der wichtige Unterschied liegt darin, dass der Anforderungsthread zum Threadpool zurückgegeben wurde, während der asynchrone Aufruf läuft.
The important difference is that the request thread has been returned to the thread pool while the asynchronous call is in progress.