Add finalizer :callback API. #119

Merged
merged 1 commit into from Dec 12, 2012

Conversation

Projects
None yet
2 participants
Contributor

ileitch commented Nov 17, 2012

Given a class that traps exits and implements a finalizer, the mix of API styles looks a little odd.

This PR adds a finalizer class method:

class Foo
  include Celluloid
  finalizer :my_finalizer

  def my_finalizer
  end
end

This also deprecates the old finalize method style.

@tarcieri tarcieri added a commit that referenced this pull request Dec 12, 2012

@tarcieri tarcieri Merge pull request #119 from ileitch/finalizer
Add finalizer :callback API.
bb682bd

@tarcieri tarcieri merged commit bb682bd into celluloid:master Dec 12, 2012

1 check passed

default The Travis build passed
Details
Owner

tarcieri commented Dec 12, 2012

Since this deprecates the previous API I wanted to hold off until 0.13 before releasing this. Seems good now ;)

Chewie referenced this pull request in celluloid/celluloid-io Mar 29, 2013

Merged

Updated examples for the new finalizer API #48

@tarcieri tarcieri added a commit that referenced this pull request Nov 29, 2014

@tarcieri tarcieri Merge pull request #119 from celluloid/fix-fd-leak
Revert "Allow waiting for read and write simultaneously"
a917de2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment