From a621a369b0db12a3205c44ef96fe05b39397104b Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Thu, 1 Feb 2007 14:21:50 +0100 Subject: [PATCH] Not using finalizers any more. --- io-multiplex/common.lisp | 1 - io-multiplex/epoll.lisp | 4 +--- io-multiplex/io.multiplex.asd | 3 --- io-multiplex/kqueue.lisp | 4 +--- sockets/net.sockets.asd | 3 --- sockets/socket-methods.lisp | 6 ++---- 6 files changed, 4 insertions(+), 17 deletions(-) diff --git a/io-multiplex/common.lisp b/io-multiplex/common.lisp index 4edc8b2..86c2c51 100644 --- a/io-multiplex/common.lisp +++ b/io-multiplex/common.lisp @@ -475,7 +475,6 @@ (defgeneric close-multiplexer (mux) (:method-combination progn :most-specific-last) (:method progn ((mux multiplexer)) - (cancel-finalization mux) (when (slot-boundp mux 'fd) (et:close (fd-of mux)) (slot-makunbound mux 'fd)) diff --git a/io-multiplex/epoll.lisp b/io-multiplex/epoll.lisp index 4f7a224..a02aaf3 100644 --- a/io-multiplex/epoll.lisp +++ b/io-multiplex/epoll.lisp @@ -39,9 +39,7 @@ (defmethod initialize-instance :after ((mux epoll-multiplexer) &key (size +epoll-default-size-hint+)) - (let ((epoll-fd (et:epoll-create size))) - (setf (slot-value mux 'fd) epoll-fd) - (et:finalize-object-closing-fd mux epoll-fd))) + (setf (slot-value mux 'fd) (et:epoll-create size))) (defun calc-epoll-flags (fd-entry) diff --git a/io-multiplex/io.multiplex.asd b/io-multiplex/io.multiplex.asd index 1f493f6..4ab415e 100644 --- a/io-multiplex/io.multiplex.asd +++ b/io-multiplex/io.multiplex.asd @@ -8,9 +8,6 @@ (defpackage #:io.multiplex-system (:use #:common-lisp #:asdf)) -#+cffi-features:no-finalizers -(error "IO.MULTIPLEX needs an implementation that has support for finalizers.") - (in-package #:io.multiplex-system) (defsystem :io.multiplex diff --git a/io-multiplex/kqueue.lisp b/io-multiplex/kqueue.lisp index ba566fa..ae976cf 100644 --- a/io-multiplex/kqueue.lisp +++ b/io-multiplex/kqueue.lisp @@ -37,9 +37,7 @@ (defmethod initialize-instance :after ((mux kqueue-multiplexer) &key) - (let ((kqueue-fd (et:kqueue))) - (setf (slot-value mux 'fd) kqueue-fd) - (et:finalize-object-closing-fd mux kqueue-fd))) + (setf (slot-value mux 'fd) (et:kqueue))) (defun do-kqueue-event-request (kqueue-fd fd-entry filter request-type) diff --git a/sockets/net.sockets.asd b/sockets/net.sockets.asd index 9c0a496..7e20a94 100644 --- a/sockets/net.sockets.asd +++ b/sockets/net.sockets.asd @@ -8,9 +8,6 @@ (defpackage #:net.sockets-system (:use #:common-lisp #:asdf)) -#+cffi-features:no-finalizers -(error "NET.SOCKETS needs an implementation that has support for finalizers.") - (in-package #:net.sockets-system) (defsystem :net.sockets diff --git a/sockets/socket-methods.lisp b/sockets/socket-methods.lisp index a563244..8cdab51 100644 --- a/sockets/socket-methods.lisp +++ b/sockets/socket-methods.lisp @@ -71,9 +71,8 @@ (setf fd file-descriptor) (setf fd (with-socket-error-filter (et:socket sf st sp)))) - (setf fam family) - (setf proto protocol) - (et:finalize-object-closing-fd socket fd)))) + (setf fam family + proto protocol)))) ;; TODO: find out how to make an FD-STREAM on other implementations (defun make-fd-stream (fd) @@ -177,7 +176,6 @@ ;;;;;;;;;;;;; (defmethod socket-close progn ((socket socket)) - (cancel-finalization socket) (when (slot-boundp socket 'fd) (with-socket-error-filter (et:close (socket-fd socket)))) -- 2.11.4.GIT