Skip to main content

2007 | OriginalPaper | Buchkapitel

Reactive, Asynchronous, and Concurrent Programming

verfasst von : Don Syme, Adam Granicz, Antonio Cisternino

Erschienen in: Expert F#

Verlag: Apress

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

S

o far in this book you’ve seen functions and objects that process their inputs immediately using a single “thread” of execution where the code runs to completion and produces useful results or state changes. In this chapter, you’ll turn your attention to

concurrent, parallel, asynchronous

, and

reactive

programs. These each represent substantially different approaches to programming from those you’ve seen so far. Some of the reasons for turning to these techniques are as follows:

To achieve better responsiveness in a graphical user interface (GUI)

To report progress results during a long-running computation and to support cancellation of these computations

To achieve greater throughput in a reactive application or service

To achieve faster processing rates on a multiprocessor machine or cluster

To take advantage of the I/O parallelism available in modern disk drives or network connections

To sustain processing while network and disk I/O operations are in process In this chapter, we cover some of the techniques that can help achieve these outcomes:

Using .NET threads and the BackgroundWorker class for background computations

Using events and messages to report results back to a GUI

Using F# asynchronous workflows and the .NET thread pool to handle network requests and other asynchronous I/O operations

Using F# pattern matching to process message queues

Using low-level .NET shared-memory primitives to implement new concurrency techniques and control access to mutable data structures

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Metadaten
Titel
Reactive, Asynchronous, and Concurrent Programming
verfasst von
Don Syme
Adam Granicz
Antonio Cisternino
Copyright-Jahr
2007
Verlag
Apress
DOI
https://doi.org/10.1007/978-1-4302-0285-1_13