From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a0224dc3d1e52f3d X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Streams and Concurrency Date: 1998/12/30 Message-ID: <76e4rg$bsr$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 427210808 References: <76c3tv$acs@bgtnsc02.worldnet.att.net> <76cat4$2ldc$1@news.gate.net> <76dn7b$a35@bgtnsc03.worldnet.att.net> X-Http-Proxy: 1.0 x6.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Wed Dec 30 21:10:09 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1998-12-30T00:00:00+00:00 List-Id: In article <76dn7b$a35@bgtnsc03.worldnet.att.net>, "James S. Rogers" wrote: > Following is a modest example of what I mean about > encapsulating a stream in a protected object. > > I believe this solution solves the interleaving problem. The read and > write operations will be atomic. The write operation will not complete > until all 'write operations for the tagged type complete. The key is > that the task calling the protected write and read operations is > ignorant of the use of a stream. No stream operations occur outside > the protection of the protected type. I see. You (probably Robert too) were talking about wrapping the client's 'Read and 'Write calls themselves. So what you have here is a multi-taksing logging package, rather than a multitasking stream. I was thinking about a pure stream implementation. There appears to be no way to write the stream itself to handle this. Perhaps that's not as bad as I first thought it was... But this solution only works for objects that are part of the same class hiearchy. That's too restrictive. I'd want to be able to use any type. It sounds like Tuck's generic suggestion is the way to go. -- T.E.D. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own