English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
이는 새 프로세스를 생성하고 초기화하는 데 사용됩니다.
spawn(Function)
기능 − 생성해야 할 기능.
이 메서드는 프로세스 ID를 반환합니다.
-module(helloworld). -export([start/0]). start() -> spawn(fun() -> server("Hello") end). server(Message) -> io:fwrite("~p",[Message]).
위의 프로그램을 실행할 때, 다음과 같은 결과를 얻게 됩니다.
“Hello”