HOME

TheInfoList



OR:

Joins is an asynchronous
concurrent computing Concurrent computing is a form of computing in which several computations are executed '' concurrently''—during overlapping time periods—instead of ''sequentially—''with one completing before the next starts. This is a property of a sys ...
API ( Join-pattern) from
Microsoft Research Microsoft Research (MSR) is the research subsidiary of Microsoft. It was created in 1991 by Richard Rashid, Bill Gates and Nathan Myhrvold with the intent to advance state-of-the-art computing and solve difficult world problems through technologi ...
for the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
. It is based on join calculus and makes the concurrency constructs of the language available as a CLI assembly that any CLI compliant language can use.


Overview

Joins can be used to express concurrency in an application using the joins pattern, usable both for multi-threaded applications as well as for event based
distributed Distribution may refer to: Mathematics *Distribution (mathematics), generalized functions used to formulate solutions of partial differential equations *Probability distribution, the probability of a particular value or value range of a varia ...
applications. The Joins API emulates declarative type-safe expression of synchronization patterns. The Joins library emulates asynchronous and synchronous methods. An asynchronous method, in Cω and Joins parlance, is one which does not block the caller method, nor does it return any result, whereas a synchronous method blocks the caller method. In the Joins API, synchronous as well as asynchronous methods are implemented as
generic Generic or generics may refer to: In business * Generic term, a common name used for a range or class of similar things not protected by trademark * Generic brand, a brand for a product that does not have an associated brand or trademark, other ...
delegates. Usage of generics provide type safety. For example, a set of synchronous and asynchronous method can be created and using them to create an object that implements the pattern, as: public class JoinDemo When asynchronous methods are called, the parameters are put in a channel, which is a queue managed by the Joins runtime. The method can optionally start a new thread to process the parameters in the background, and return the results. When the corresponding synchronous method is called the parameter is returned for further processing. If no parameter is present in the queue when the synchronous method is called, the caller stalls. The Joins runtime schedules which parameter is returned based on whether it is ready. The synchronization pattern of the methods are defined by ''joins patterns'', which describes what happens when a set of channels are invoked. For example, what happens when ''Send'' and ''Retrieve'' are called together can be different than ''Send'' and ''Queue''. public void SetPatterns()


References


The Joins Concurrency LibraryJoins — A Concurrency Library


External links


Joins at Microsoft Research
Concurrent programming libraries Microsoft Research Articles with example Java code {{Microsoft-software-stub