Alternatively rand module using random

random module using the same seed, there will be the same result in a different process.

rand modules use a different seed, it will not be the same result in a different process.

Two modules are erlang own.

Then erlang in the document which indicate the recommended replacement random rand

 

Recently deployed a problem, because the project has a file name is rand.erl, delete the source code, but the compiler generates the beam is not deleted, the deployment went out, leading to a failure to restart several times. Be sure to delete the file after compiling a directory of the beam, and then recompile.

Reproduced in: https: //my.oschina.net/u/191928/blog/618649

Guess you like

Origin blog.csdn.net/weixin_33834679/article/details/91987003