[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

6842: [MUD-Dev] Re: lurker emerges

[Full Header] [Plain Text]
From: Vadim Tkachenko <vt@freehold.crocodile.org>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 11 Aug 1998 01:13:36 -0500
References: [1] [2] <-newest
Organization: Kanga.Nu
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@freehold.crocodile.org>
--
UNIX _is_ user friendly, he's just very picky about who his friends are