Live data from Hacker News

Racket v6.1 released. Undefined values from uninitialized variables eliminated

blog.racket-lang.org

1–4 of 4 posts

Re: Racket v6.1 released. Undefined values from uninitialized variables eliminated

#4
The new "plumber" mechanism is useful for things like flushing buffers, doing clean disconnects from network services, committing or rolling-back transactions, and releasing kernel resources.

For example, you might be using a buffered TCP/IP connection to a message broker. Registering a plumber flush callback would let you automatically flush and close the connection before the process exits.

Similarly, 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.

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