@@ -103,12 +103,19 @@ defmodule Process do
103
103
104
104
@ doc """
105
105
Returns the pid of a new process started by the application of `fun`.
106
+ It behaves exactly the same as `Kernel.spawn/1`.
107
+ """
108
+ def spawn ( fun ) do
109
+ :erlang . spawn ( fun )
110
+ end
106
111
107
- It behaves exactly the same as the `Kernel.spawn/1` function except
108
- it also accepts extra options, for the list of available options
109
- check http://www.erlang.org/doc/man/erlang.html#spawn_opt-4
112
+ @ doc """
113
+ Returns the pid of a new process started by the application of `fun`.
114
+
115
+ It also accepts extra options, for the list of available options
116
+ check http://www.erlang.org/doc/man/erlang.html#spawn_opt-2
110
117
"""
111
- def spawn ( fun , opts // [ ] ) do
118
+ def spawn ( fun , opts ) do
112
119
:erlang . spawn_opt ( fun , opts )
113
120
end
114
121
@@ -117,12 +124,22 @@ defmodule Process do
117
124
`module.function(args)`. The new process created will be placed in the system
118
125
scheduler queue and be run some time later.
119
126
120
- It behaves exactly the same as the `Kernel.spawn/3` function except
121
- it also accepts extra options, for the list of available options
127
+ It behaves exactly the same as the `Kernel.spawn/3` function.
128
+ """
129
+ def spawn ( mod , fun , args ) do
130
+ :erlang . spawn ( mod , fun , args )
131
+ end
132
+
133
+ @ doc """
134
+ Returns the pid of a new process started by the application of
135
+ `module.function(args)`. The new process created will be placed in the system
136
+ scheduler queue and be run some time later.
137
+
138
+ It also accepts extra options, for the list of available options
122
139
check http://www.erlang.org/doc/man/erlang.html#spawn_opt-4
123
140
124
141
"""
125
- def spawn ( mod , fun , args , opts // [ ] ) do
142
+ def spawn ( mod , fun , args , opts ) do
126
143
:erlang . spawn_opt ( mod , fun , args , opts )
127
144
end
128
145
0 commit comments