[erlang-questions] looking for doco on io:requests/2

jm <>
Thu Jun 14 11:47:46 CEST 2007

Can anyone explain what

handle(Stream, LineNo, L, NErrors) ->
    handle1(io:requests(Stream, [{get_until,foo,ecc_lex,
                          tokens,[LineNo]}]), Stream, L, NErrors).

does in parser_tutorial-1.0? Especially io:requests/2 there doesn't
appear to be any documentation and the source in
.../stdlib-1.14.4/src/io.erl has

requests(standard_io, Requests) ->       %Requests as atomic action
    requests(group_leader(), Requests);

where group_leader() "Returns the pid of the group leader for the
process which evaluates the function" [kernel man page], which then leads to

requests(Pid, Requests) when pid(Pid) ->
    request(Pid, {requests,io_requests(Pid, Requests)});

rather than me keep digging for what I'm sure someone explain succinctly
I thought I'd throw it open to the list for a quick explaination.


More information about the erlang-questions mailing list