Humprey Cogay - SQLWanderer
Everything I Love to Do Goes Here =)
Site Sections
Home
Contact
Syndication
Login
Posts
22
Comments
75
Trackbacks
0
semaphore
Semaphores for better distribution of work items across threads
As developers we will often find ourselves doing loops/iterations to process hundreds, thousands or even millions of items, e.g. parsing files, screen scraping sites, doing complex computations on multiple rows etc. To process these types of jobs, we can take a look on some supermarket lines, where we have 1 long line with several counters catering to 1 customer at a time, when a cashier is done with the current customer, one customer will be called from the line. On the programming world we have ......
Share This Post:
Short Url:
http://wblo.gs/ntT
Posted On
Tuesday, September 13, 2016 7:20 PM
|
Comments (2)
Semaphores–queuing with multiple workers–C#
One of the challenges of working with queues is how to properly and neatly process each item using multiple workers, luckily on .Net we have Semaphores. “In computer science, a semaphore is a variable or abstract data type that is used for controlling access, by multiple processes, to a common resource in a concurrent system such as a multiprogramming operating system.” https://en.wikipedia.org/wi... Below is a simple program that demonstrate the use of semaphore with a parametized ......
Share This Post:
Short Url:
http://wblo.gs/jzt
Posted On
Thursday, May 19, 2016 9:20 PM
|
Comments (0)
Archives
May 2018 (2)
November 2016 (1)
September 2016 (1)
July 2016 (1)
June 2016 (2)
May 2016 (1)
February 2016 (1)
January 2016 (1)
June 2014 (1)
December 2012 (1)
June 2011 (1)
May 2011 (1)
April 2011 (2)
March 2011 (2)
January 2011 (2)
December 2010 (2)
Post Categories
Microsoft Dynamics AX
BizTalk Server
Windows Azure
ServiceBus
EDI
EAI
64-bit Computing
SSO
HL7
SQL Server
Virtualization
Concurrency
IIS7.0
Tag Cloud
Internals
Memory
MSSQL
Copyright © 2005 Humprey Cogay, SQLWanderer
This work is licensed under a
Creative Commons License