Concurrent access control of shared resources, such as ticketing system

hello
my teacher give a homework like a ticket system
i write a python edition by threading and lock
and i wonder how to write ticket system in elixir
a ticket for a erlang process?
puzzled