<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Concurrency on F# for Fun and Profit</title>
    <link>https://fsharpforfunandprofit.com/categories/concurrency/</link>
    <description>Recent content in Concurrency on F# for Fun and Profit</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 26 Apr 2012 00:00:00 +0000</lastBuildDate><atom:link href="https://fsharpforfunandprofit.com/categories/concurrency/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Functional Reactive Programming</title>
      <link>https://fsharpforfunandprofit.com/posts/concurrency-reactive/</link>
      <pubDate>Thu, 26 Apr 2012 00:00:00 +0000</pubDate>
      
      <guid>https://fsharpforfunandprofit.com/posts/concurrency-reactive/</guid>
      <description>Events are everywhere. Almost every program has to handle events, whether it be button clicks in the user interface, listening to sockets in a server, or even a system shutdown notification.
And events are the basis of one of the most common OO design patterns: the &amp;ldquo;Observer&amp;rdquo; pattern.
But as we know, event handling, like concurrency in general, can be tricky to implement. Simple event logic is straightforward, but what about logic like &amp;ldquo;do something if two events happen in a row but do something different if only one event happens&amp;rdquo; or &amp;ldquo;do something if two events happen at roughly the same time&amp;rdquo;.</description>
    </item>
    
    <item>
      <title>Messages and Agents</title>
      <link>https://fsharpforfunandprofit.com/posts/concurrency-actor-model/</link>
      <pubDate>Wed, 25 Apr 2012 00:00:00 +0000</pubDate>
      
      <guid>https://fsharpforfunandprofit.com/posts/concurrency-actor-model/</guid>
      <description>In this post, we&amp;rsquo;ll look at the message-based (or actor-based) approach to concurrency.
In this approach, when one task wants to communicate with another, it sends it a message, rather than contacting it directly. The messages are put on a queue, and the receiving task (known as an &amp;ldquo;actor&amp;rdquo; or &amp;ldquo;agent&amp;rdquo;) pulls the messages off the queue one at a time to process them.
This message-based approach has been applied to many situations, from low-level network sockets (built on TCP/IP) to enterprise wide application integration systems (for example RabbitMQ or IBM WebSphere MQ).</description>
    </item>
    
    <item>
      <title>Asynchronous programming</title>
      <link>https://fsharpforfunandprofit.com/posts/concurrency-async-and-parallel/</link>
      <pubDate>Tue, 24 Apr 2012 00:00:00 +0000</pubDate>
      
      <guid>https://fsharpforfunandprofit.com/posts/concurrency-async-and-parallel/</guid>
      <description>In this post we&amp;rsquo;ll have a look at a few ways to write asynchronous code in F#, and a very brief example of parallelism as well.
Traditional asynchronous programming     As noted in the previous post, F# can directly use all the usual .NET suspects, such as Thread AutoResetEvent, BackgroundWorker and IAsyncResult.
Let&amp;rsquo;s see a simple example where we wait for a timer event to go off:</description>
    </item>
    
    <item>
      <title>Concurrency</title>
      <link>https://fsharpforfunandprofit.com/posts/concurrency-intro/</link>
      <pubDate>Mon, 23 Apr 2012 00:00:00 +0000</pubDate>
      
      <guid>https://fsharpforfunandprofit.com/posts/concurrency-intro/</guid>
      <description>We hear a lot about concurrency nowadays, how important it is, and how it is &amp;ldquo;the next major revolution in how we write software&amp;rdquo;.
So what do we actually mean by &amp;ldquo;concurrency&amp;rdquo; and how can F# help?
The simplest definition of concurrency is just &amp;ldquo;several things happening at once, and maybe interacting with each other&amp;rdquo;. It seems a trivial definition, but the key point is that most computer programs (and languages) are designed to work serially, on one thing at a time, and are not well-equipped to handle concurrency.</description>
    </item>
    
  </channel>
</rss>
