Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Racket v6.1 released. Undefined values from uninitialized variables eliminated (racket-lang.org)
62 points by racketlang on Aug 2, 2014 | hide | past | favorite | 2 comments


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/


There is a more technical discussion about the new undefined behavior in the mailing list, when it was incorporated: http://lists.racket-lang.org/users/archive/2014-April/062148...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: