This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(sushi). | |
-export([main/1, run/3]). | |
%% K is the number of chairs, N is the number of customers. | |
%% Initializes the threads and waits for it to finish | |
main([K, N, SleepTime|_]) -> | |
init(list_to_integer(K)), | |
gen_customers(list_to_integer(N), list_to_integer(SleepTime)), | |
loop(0, list_to_integer(N)), | |
unregister(main), |