[erlang-questions] pid to integer and back
Wed Oct 8 18:14:05 CEST 2008
And what about term_to_binary?
On Wed, Oct 8, 2008 at 6:01 PM, Joel Reymont <> wrote:
> Is there a safe and efficient way to convert pid to integer and back?
> I'm assigning each running poker game an integer id. I store this id
> into every outgoing packet so there's no database lookup.
> I use the id to lookup the game process for every incoming packet,
> though. This is proving to be extremely inefficient, even with dirty
> mnesia reads.
> I actually repeat the above for every player, so there's twice the
> overhead. Is there a way to avoid it?
> This would only apply to running games and connected players so this
> would be a temporary integer, valid while the process is alive.
> Thanks, Joel
> erlang-questions mailing list
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions