Bag is the list of all instances of Template such
that Tuple exists in the tuple-space. The behavior of
variables in Tuple and Template is as in bagof/3.
The variables could be existentially quantified with ^/2
as in bagof/3. The operation is performed
as an atomic operation. This predicate can fail due to a timeout.
Example: Assume that only one client is connected to the server and that
the tuple-space initially is empty.
?- out(x(a,3)), out(x(a,4)), out(x(b,3)), out(x(c,3)).
true.
?- bagof_rd_noblock(C-N, x(C,N), L).
L = [a-3,a-4,b-3,c-3] .
true.
?- bagof_rd_noblock(C, N^x(C,N), L).
L = [a,a,b,c] .
true.