Return-Path: Delivered-To: apmail-lucene-lucy-dev-archive@minotaur.apache.org Received: (qmail 14072 invoked from network); 30 Dec 2009 03:30:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Dec 2009 03:30:04 -0000 Received: (qmail 11525 invoked by uid 500); 30 Dec 2009 03:30:04 -0000 Delivered-To: apmail-lucene-lucy-dev-archive@lucene.apache.org Received: (qmail 11465 invoked by uid 500); 30 Dec 2009 03:30:02 -0000 Mailing-List: contact lucy-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@lucene.apache.org Delivered-To: mailing list lucy-dev@lucene.apache.org Received: (qmail 11444 invoked by uid 99); 30 Dec 2009 03:30:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 03:30:02 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2009 03:29:51 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 69D2F234C045 for ; Tue, 29 Dec 2009 19:29:29 -0800 (PST) Message-ID: <1219574970.1262143769421.JavaMail.jira@brutus.apache.org> Date: Wed, 30 Dec 2009 03:29:29 +0000 (UTC) From: "Marvin Humphrey (JIRA)" To: lucy-dev@lucene.apache.org Subject: [jira] Commented: (LUCY-90) Stateless VTables In-Reply-To: <322896969.1261941569646.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCY-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795227#action_12795227 ] Marvin Humphrey commented on LUCY-90: ------------------------------------- Test file committed as r894538 -- it was missed on the earlier commit. > Stateless VTables > ----------------- > > Key: LUCY-90 > URL: https://issues.apache.org/jira/browse/LUCY-90 > Project: Lucy > Issue Type: Improvement > Components: Core > Reporter: Marvin Humphrey > Assignee: Marvin Humphrey > Attachments: stateless_vtables.diff > > > Making VTables immortal is step one towards basic thread-safety for Lucy as a > library. This patch removes reference counting from VTables, and also > ensures that once added to the VTable_registry they are never removed. > We would like to make VTables completely stateless, and this patch achieves > that for everything except the VTable's cached host object. In Perl's case, > it is impossible to stop the host from manipulating the cached host object's > SvREFCNT; other hosts may have similar constraints. > It is assumed that the host knows how to serialize access to its own objects > (which we achieve in Perl by calling "SvSHARE(vtable->ref.host_obj)"). For > the rest of Lucy, we simply deny access to the host object by making > VTable_Inc_RefCount() and VTable_Dec_RefCount() no-ops, and by having > VTable_Get_RefCount() always return 1 regardless of the state of the host > object. > With that refcounting trick in place, from the perspective of Lucy's innards, > VTables are stateless. > The VTable registration process is still racy -- it is not safe to create and > register new VTable singletons from multiple threads -- but that is left for > another patch. > Mailing list discussion: http://markmail.org/message/eyjvfc72r653t76i -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.