plt/racket — pull request #481 by takikawa (2013-10-30 02:09:45+00:00)
Title: Add support for channel chaperones

For code review.

This PR adds support for channel chaperones/impersonators, which I plan to use to support contracts for channels. (and thus Typed Racket interoperation)

These channel chaperones protect both the "put" and "get" ends of the channel, but reuses the machinery for synchronizable event chaperones for the "get" end (which means every channel chaperone is really two chaperones). Only the "put" end has extra checking code. To this end, I've exported the chaperone wrapping function for events.

I'd appreciate if @mflatt or anyone else familiar with the chaperone/impersonator internals could take a look. Thanks.