Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implement list_workers.

  • Loading branch information...
commit e20313123a3c2fa17d8a16c8378618359b870f30 1 parent 012084a
Carl-Johan Kjellander authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 cth_rsa.erl
View
10 cth_rsa.erl
@@ -45,6 +45,7 @@
, master_loop/1
, mterminate/0
, mupdate/0
+ , listworkers/0
, dist_primes/1
, factor/1
, dist_gen_key/1
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.