[MUD-Dev] Re: lurker emerges

Vadim Tkachenko vt at freehold.crocodile.org
Tue Aug 11 01:13:36 CEST 1998


Vadim Tkachenko wrote:
> 
[skipped]

> ACT is the Asynchronous Completion Token (Design patterns...), has
> read_count field and a semaphore.
> 
> ACT     asyncread( buffer, how_much_do_I_want, boolean all_async );
> 
> OK, so what I have is some read performed at once (no sense in async
> read if I know the absolute minimum I want), and then I know how much
> did I read - the ACT has it. Then, I can go out and do my stuff, and
> when I'm ready I may go out and wait for the completion semaphore (let
> me emphasise, _event_ semaphore).

On the second thought, it may be just a completion bit, too (even for a
single-threaded app). Semaphore if you really want to receive the
notification callback or just wait for it, but it's definitely more
expensive.

--
Still alive and smile stays on,
Vadim Tkachenko <vt at freehold.crocodile.org>
--
UNIX _is_ user friendly, he's just very picky about who his friends are




More information about the mud-dev-archive mailing list