Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!adobe!asente From: asente@adobe.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: OW as a PostScript X server... Message-ID: <8377@adobe.UUCP> Date: 19 Nov 90 21:10:11 GMT References: <1990Nov13.231333.23226@crl.dec.com> <2787@exodus.Eng.Sun.COM> <1990Nov15.021857.21755@crl.dec.com> Sender: news@adobe.COM Organization: Adobe Systems Inc. Lines: 43 In article <1990Nov15.021857.21755@crl.dec.com> jg@zorch.crl.dec.com (Jim Gettys) writes: >Clearly, if you start a PostScript code running with loops, you had better >be able to synchronize. But the case I'm interested in is slightly different. ... >Maybe a DPS expert can clarify what it actually means. > >If DPS violates my rules above (which is really the principle of "don't >surprise the poor programmer") such that simple immediate rendering commands >can't be interspersed with X rendering commands and execute in the >order the naive programmer expects, then I'm not happy with DPS as it >currently stands, in which case, if true, as Shakespeare said: >"A Pox on Both Your Houses." > >I do stand by my statements that a single connection is the correct approach, >in order not to give programmers unneeded problems. You have to remember that the PostScript language is interpreted and allows you to redefine its operators. There's no way to know that the "lineto" operator hasn't been redefined to call a loop that runs for 10 minutes. It's inherent in the nature of the beast. Using a single connection gives you free synchronization in one direction. You can, for example, create a drawable and immediately image into it with PostScript code; no need to synchronize. If you want to know that the PostScript has completed, you must synchronize afterwards. I would argue that saying "you must always synchronize after PostScript rendering before relying upon the results for X calls" an easier rule for programmers to remember than something like "you don't need to synchronize as long as you use only built-in operators that haven't been redefined and you only use <= N of them in one call and by the way no loops and no large image manipulations that can take several seconds and no text since the font definition can contain arbitrary PostScript and..." Tim Glauert presented a synchronization extension at the EXUG conference earlier this fall. This would be just the thing for DPS/X since it would allow the synchronization to take place in the server without round trips. You would be able to say, "Don't execute any more requests on this input stream until the PostScript code completes." I hope it gets picked up by the Consortium for R5. -paul asente asente@adobe.com ...decwrl!adobe!asente