Skip to content

Commit

Permalink
implement list_workers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl-Johan Kjellander committed Feb 28, 2011
1 parent 012084a commit e203131
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cth_rsa.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
, master_loop/1
, mterminate/0
, mupdate/0
, listworkers/0
, dist_primes/1
, factor/1
, dist_gen_key/1
Expand Down Expand Up @@ -457,6 +458,15 @@ mterminate() ->
mupdate() ->
master ! update.

%% @spec listworkers() -> List
%% List = [pid()]
%% @doc Returns the list of servants.
listworkers() ->
master ! {listworkers, self()},
receive
W -> W
end.

%% @spec dist_primes(Bits::integer()) -> {ok, primes, {P, Q}}
%% P = integer()
%% Q = integer()
Expand Down

0 comments on commit e203131

Please sign in to comment.