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
read more | digg story
Hi Peter,
ReplyDeleteI 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!