Asynchronous Fire and Forget Pattern Redux

Illustrates the use of the Asynchronous "Fire and Forget" Delegate invocation pattern in .NET. Sample console app performs enqueing of 100,000 Sql Server inserts with this pattern in from 2.5 to 5.5 seconds, depending on the machine setup. Complete source code download.

read more | digg story

Comments

  1. Cristi5:10 AM

    Hi Peter,

    I am using your FireForget pattern from ThreadUtil.cs into a windows service. This service collects data from the network and when the data is available "fires and forgets" to insert this data into a sql server db. I am getting this data in chunks of X. If data available is bigger than X, more than one "fire forget" might be called at the same time.

    My problem is that sometimes I get "TargetInvocationException" and I don't know exactly how to solve it.

    Do you have any hints at all?

    Thanks in advance!

    ReplyDelete

Post a Comment

Popular posts from this blog

FIREFOX / IE Word-Wrap, Word-Break, TABLES FIX

Some observations on Script Callbacks, "AJAX", "ATLAS" "AHAB" and where it's all going.

IE7 - Vista: "Internet Explorer has stopped Working"