Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 25208 invoked from network); 24 Jan 2007 18:12:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2007 18:12:13 -0000 Received: (qmail 48265 invoked by uid 500); 24 Jan 2007 18:12:16 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 48242 invoked by uid 500); 24 Jan 2007 18:12:15 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 48233 invoked by uid 99); 24 Jan 2007 18:12:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 10:12:15 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of t.p.ellison@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 10:12:05 -0800 Received: by nf-out-0910.google.com with SMTP id a4so656139nfc for ; Wed, 24 Jan 2007 10:11:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:content-transfer-encoding; b=GCzAdx4jkQ2iObsHgTiXlkKjPpSLa5f8VS9ENlrvByITp3cImIj+tUCLKVwcjopk8rjIgOXGvXDhndCp+7sQA95iaMHZpdDYaer1tbO3F6W6xueXeMX62/ITODr8Wagl7EhK3Aus8TrfK8MK+HA4uKGkxpTaJtDr38MBwE7ispA= Received: by 10.49.91.6 with SMTP id t6mr3265520nfl.1169662304384; Wed, 24 Jan 2007 10:11:44 -0800 (PST) Received: from ?9.20.183.67? ( [195.212.29.83]) by mx.google.com with ESMTP id p45sm7156098nfa.2007.01.24.10.11.43; Wed, 24 Jan 2007 10:11:43 -0800 (PST) Message-ID: <45B7A162.5090304@gmail.com> Date: Wed, 24 Jan 2007 18:11:46 +0000 From: Tim Ellison User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [vmi] thread library References: <45B78F90.6070605@gmail.com> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Geir Magnusson Jr. wrote: > On Jan 24, 2007, at 11:55 AM, Tim Ellison wrote: > >> Another attempt to resolve the threadlib mismatch problem between >> classlib and VM Apologies to those who have been round this loop >> multiple times already. >> >> The original intent of the hythr.dll was to provide a thread library >> that was shared between the VM and class library code. But as we know, >> all too painfully, we haven't seen that work too well; mainly I would >> say because each VM has a close interest in the thread functionality. >> >> The class library needs to use the threading functions, but the contract >> between classlib and threading is a bit simpler than that between the VM >> and threading. >> >> So the proposal on the table is to discover the APIs that the classlib >> needs, and add them to a new function table in the VMI struct. That >> would then put the onus on the VM to implement the thread functions. >> >> We may choose to keep the existing threadlib code around as a reference >> for VMs that want to use it, and possibly so that the new class library >> native tests have something to use, but 'in production' the classlibs >> would be expected to use the same thread library code as the VM. > > I'd be worried about the implications on testing. It would be nice if > users could easily use their implementation as part of the native tests. Sure -- I didn't mean to imply that that the classlib native tests would only work against this 'reference' threadlib. If the tests (i.e. just the new portlib native tests today) are built against a particular VMs threadlib then they would use that one. Keeping the current classlib impl of threadlib would mean that you didn't have to choose any particular VM's threadlib to run the tests, but maybe it's ok to do that, and we just delete the current one in classlib. >> This means that the VMI would have: >> - GetPortLibrary(...) = gets portlib function table >> - GetVMLSFunctions(...) = gets VM local storage functions >> - GetThreadLibrary(...) = get thread library function table *new* >> - all the other dross... >> >> I'm aware that extending the VMI makes it that much more difficult for >> new VMs to play with the Harmony class library code, but in this case it >> seems that trying to provide the threadlib is not solving the right >> problem. > > Why do you say it's that much more difficult? Don't they have to > implement this anyway? Each extension to the VMI means that VM writers have more work to do, so we should endeavour to minimize that API. If we could share the classlib threadlib impl then again, less work all round; but in this case I have become convinced that the VM wants to retain control, and the classlib can call into it. Regards, Tim