Spinroot

A forum for Spin users

You are not logged in.

#1 2012-03-28 18:46:07

Moosa_27
Member
Registered: 2012-03-28
Posts: 1

How to do a blocking receive on 'any' channel ?

I have a process that has several channels and at some point, I know a message is going to come but don't know from which channel. So want to wait (block) the process until it a message comes from any of the several channels. how can I do that?

Offline

#2 2012-03-29 03:45:57

spinroot
forum
Registered: 2010-11-18
Posts: 691
Website

Re: How to do a blocking receive on 'any' channel ?

Just write it with a non-deterministic selection statement:

if
:: q1?m1 -> ...
:: q2?m2 -> ...
.....
fi

Offline

Board footer

Powered by FluxBB