streampool.pl -- Input multiplexing
This libary allows a single thread to monitor multiple streams and call
a goal if input is available on a stream.
- bug
- - Note that if the processing predicate blocks other input channals
are not processed. This may happen, for example, if a read/2 call blocks
due to incomplete input.
- delete_stream_from_pool(+Stream)
- Retract stream from the pool
- close_stream_pool
- Close all streams in the pool. This causes stream_pool_main_loop/0
to terminate.
- dispatch_stream_pool(+TimeOut)
- Wait for input on one or more streams and handle that. Wait for at
most TimeOut seconds (0 means infinite).
- stream_pool_main_loop
- Keep handling input from the streams in the pool until they have all
died away.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- add_stream_to_pool(Arg1, Arg2)