How does one store multiple structures/items in a gen_server's state?
I want to store a reference to an ets table, as well as a queue and a counter(integer).
Thanks
使用记录?
-record(state, {table, queue, counter}).
A gen_server's state is just an arbitrary erlang term. Use whatever is most convenient (a record, a tuple, a list, a dict, whatever)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.