ETS is handy

Dev Corner - Ernie Makris - February 21, 2006

The other day I wanted to create a counter that is shared amongst many clients that were connecting to a server. I wanted to assign a unique id to each, so I quickly listed how I would do this in erlang.

These are:
Create a gen_server process that has private state that contains the counter variableUse ETSMake the accepting gen_server keep track of and assign incremental ids….
There are



Categories: Blogs  Dev Corner  

Comments

No comments so far, you could be the first.

Add comment

Name:

Email:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?