Depending on what kind of guarantees you want, there is a simpler way than using make-output-port. You can create a pipe and then use copy-port to duplicate the data in a separate thread. Be sure to close the intermediate ports, tho, or else you may wait forever for the data.
Robby On Fri, Sep 7, 2012 at 1:43 AM, Kartik Agaram <[email protected]> wrote: > I'm trying to build an output port that acts like 'tee', wrapping two > (or more) output ports and duplicating writes to them. This requires > make-output-port > (http://docs.racket-lang.org/reference/customport.html#%28def._%28%28quote._~23~25kernel%29._make-output-port%29%29), > right? I'm trying to think about what the evt arg to make-output-port > should be. It needs to be the AND of the sync-readiness of all the > constituent ports, right? Is there a way to specify that? choice-evt > (http://docs.racket-lang.org/reference/sync.html#%28def._%28%28quote._~23~25kernel%29._choice-evt%29%29) > is an OR, if I'm reading the docs right.. > > Thanks, > Kartik > http://akkartik.name > ____________________ > Racket Users list: > http://lists.racket-lang.org/users ____________________ Racket Users list: http://lists.racket-lang.org/users

