Storing pids

Mats Cronqvist mats.cronqvist@REDACTED
Thu Jan 5 12:40:23 CET 2006


   fwiw, i always discard the first (node id) digit when logging pids.

 > tl(string:tokens(erlang:pid_to_list(self()),"<>.")).
["31","0"]

   mats

Joel Reymont wrote:
> Yes, I'm aware of this and it's what I use. I'm now wondering if  
> phash-ing the pids would be better than storing them.
> 
> The issue is that the pids that were stored in the disk log seem to  
> change depending on whether you just print them or convert them to a  
> list. I get, say, 4000.34.0 when printing and  4001.34.0 when  
> converting the same to a list.
> 
>     Thanks, Joel
> 
> On Jan 4, 2006, at 10:04 PM, Ulf Wiger wrote:
> 
>> 1> erlang:pid_to_list(self()).
>> "<0.34.0>"
> 
> 
> -- 
> http://wagerlabs.com/
> 
> 
> 
> 
> 



More information about the erlang-questions mailing list