[racket] Additional use for the new plumber mechanism

From: Tony Garnock-Jones (tonyg at ccs.neu.edu)
Date: Sat Aug 2 21:08:45 EDT 2014

Hi all,

I discovered today that the PortAudio library [1] requires you to call
Pa_Terminate on pain of possible kernel resource leaks. The plumber
mechanism can be used to ensure Pa_Terminate is called before process exit.

I had been having trouble imagining uses for the new "plumber" mechanism
[2] besides things like flushing buffers, doing clean disconnects from
network services, and committing or rolling-back transactions. This new
example is an interesting variation. (Thanks again, Matthew!)

Cheers,
  Tony

[1] http://www.portaudio.com/

[2]
http://www.cs.utah.edu/plt/snapshots/current/doc/reference/plumbers.html
(I couldn't find the documentation for it on racket-lang.org!)

Posted on the users mailing list.