Difference between revisions of "Nonblocking"
From Mesham
Jump to navigationJump to searchm |
m |
||
Line 16: | Line 16: | ||
In the P2P communication resulting from assignment ''a:=b'', process 1 will issue a non-blocking receive whilst process 2 will issue a blocking send. All nonblocking communication with respect to variable ''a'' is completed by the keyword ''sync a''. | In the P2P communication resulting from assignment ''a:=b'', process 1 will issue a non-blocking receive whilst process 2 will issue a blocking send. All nonblocking communication with respect to variable ''a'' is completed by the keyword ''sync a''. | ||
+ | ''Since: Version 0.41b'' | ||
[[Category:Type Library]] | [[Category:Type Library]] | ||
[[Category:Compound Types]] | [[Category:Compound Types]] | ||
[[Category:Communication Mode Types]] | [[Category:Communication Mode Types]] |
Revision as of 18:22, 13 January 2013
Syntax
nonblocking[ ]
Semantics
This type will force P2P communication to be nonblocking. In this mode communication (send or receive) can be thought of as having two distinct states - start and finish. The nonblocking type will start communication and allows program execution to continue between these two states, whilst blocking (standard) mode requires the finish state has been reached before continuing. The sync keyword can be used to force the program to wait until finish state has been reached.
Example
var a:Int::allocated[single[on[1]]] :: nonblocking[]; var b:Int::allocated[single[on[2]]]; a:=b; sync a;
In the P2P communication resulting from assignment a:=b, process 1 will issue a non-blocking receive whilst process 2 will issue a blocking send. All nonblocking communication with respect to variable a is completed by the keyword sync a.
Since: Version 0.41b