Regarding Cigarette Smoker's problem

Richard O'Keefe raoknz@REDACTED
Wed Nov 11 02:57:45 CET 2020

Did you try a web search for
Cigarette Smokers problem solved in Erlang
If not, why not?

One fairly obvious approach is for the smokers
to register themselves, one as 'tobacco', one as
'paper', and one as 'matches'.
  arbiter() ->
     select a random element of [tobacco,paper,matches] as Who,

Another approach would be for the smokers to register
themselves with the arbiter in a startup phase.

Let me put it this way.
Try to make your code so simple and obvious that it
is hard to get wrong.
Then find the mistakes.

On Mon, 9 Nov 2020 at 21:16, AshiSh Kulkarni <kul2971@REDACTED> wrote:

> Hello,
> I am new to erlang. And I  am trying to implement the Cigarette Smoker's
> Problem In Erlang,but i'm having some errors. So if anybody has already
> implemented the code in erlang, plz can you mail me ASAP.
> Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the erlang-questions mailing list