7sharp9's blog
A cup of tea would restore my normality. - Douglas Adams
agents ast async concurrency csharp elixir elm fable fsharp functional-programming fuse games ios javascript mac mailboxprocessor metaprogramming microsoft mono monodevelop monogame monotouch myriad performance quotations running sockets threading tpl tpl-dataflow typeproviders videos xamarin youtube

© 2011 - 2020 7sharp9

Powered by Hugo with theme Dream.

FSharp Dataflow agents III

FSharp Dataflow agents III

Monday, Feb 20, 2012

@ 7sharp9

This will be the last post on rebuilding the MailboxProcessor using TDF, here’s a quick discussion of the missing pieces… First, lets start with the simple ones, these don’t really require much discussion. DefaultTimeout let mutable defaultTimeout = Timeout.Infinite member x.DefaultTimeout with get() = defaultTimeout and set(value) = defaultTimeout <- value This simply provides a mutable property using Timeout.Infinite as a default setting. CurrentQueueLength member x.CurrentQueueLength() = incomingMessages.Count Another simple one, this methods uses into the underlying BufferBlock to extract its current queue length using its Count property.
F# Dataflow Agents Part II

F# Dataflow Agents Part II

Monday, Jan 30, 2012

@ 7sharp9

Right, no messing about this time, straight to the code. Construction This is pretty straight forward and I don’t want to detract from the important bits of this post, the only thing of note is the cancellationToken which is initialized to a default value using the defaultArg function if the optional parameter cancellationToken is not supplied. The TDF construct that we to use to perform most of the hard work is incomingMessages which is a BufferBlock<'Msg>.
F# Dataflow Agents Part I

F# Dataflow Agents Part I

Sunday, Jan 22, 2012

@ 7sharp9

This is going to be a new series on using TPL Dataflow with F#. First a little bit of history and background. TPL Dataflows heritage and background TPL Dataflow or (TDF) has been around for quite a while, it first surfaced more than a year ago as the successor to the Concurrency and Coordination Runtime (CCR) and with coming release of .Net 4.5 it will be part of the System.Threading.Tasks.Dataflow namespace.

About Me

Hi, my name is Dave Thomas and Im a software engineer from the Uk. I work primarily in F# but also like to tinker with pretty much any interesting language. Im drawn to more functional languages like F#, Swift and Rust.

Have questions or suggestions? Feel free to ask me on Twitter.

Thanks for reading!

Dave Thomas