MUD-Dev
mailing list archive

[ Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

[MUD-Dev] Re: lurker emerges



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




[ Other Periods  | Other mailing lists  | Search  ]