2012-05-07 18 views
3

當測試開源項目'gproc'的功能時, 我發現list_to_pid對於本地pid是可以的,對於遠程pid不是好的。我的erlang運行時間是R15B。list轉換爲pid函數list_to_pid/1的限制

([email protected])29> D = list_to_pid("<0.239.0>"). 
<0.239.0> 
([email protected])30> D == self(). %% equal here 
true 
([email protected])31> f(E). 
ok 
([email protected])32> E = gproc:where(Name).  
<8969.239.0> 
([email protected])33> F = list_to_pid("<8969.239.0>"). 
<8969.239.0> 
([email protected])34> F == E. %% not equal here 
false 

從關於此功能的用戶指南中,沒有這樣的限制。它是錯誤嗎?

回答

5

您可以確認here無法將list_to_pid/1與外部pid一起使用。

如果你檢查谷歌,我想你也可以找到Ulf Wiger開始的原始線程。

希望這會有所幫助!

+0

ML帖子在這裏:http://erlang.org/pipermail/erlang-questions/2009-February/042100.html –