Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 352 invoked from network); 10 Oct 2006 16:51:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2006 16:51:19 -0000 Received: (qmail 16592 invoked by uid 500); 10 Oct 2006 16:51:18 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 16572 invoked by uid 500); 10 Oct 2006 16:51:18 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 16563 invoked by uid 99); 10 Oct 2006 16:51:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 09:51:18 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 72.14.214.236 as permitted sender) Received: from [72.14.214.236] (HELO hu-out-0506.google.com) (72.14.214.236) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Oct 2006 09:51:18 -0700 Received: by hu-out-0506.google.com with SMTP id 34so1730246hui for ; Tue, 10 Oct 2006 09:50:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fN+1Yk4kFOi5ReZihAnukDGWmFXXkldcOwMFsFH1U1grprFjQJGUwQlyLpW0ZmGCHFNMRSNIYTcn7I6uaAqyIrMEJLABVBIlqz4FRONsAMil9vEJ9pdmJJfufUEim5PDcxm09Ikb57bAWA1V0DErQo4l4QSfsHCa7XwcmpWj6PU= Received: by 10.82.109.19 with SMTP id h19mr796919buc; Tue, 10 Oct 2006 09:50:56 -0700 (PDT) Received: by 10.82.147.16 with HTTP; Tue, 10 Oct 2006 09:50:56 -0700 (PDT) Message-ID: Date: Tue, 10 Oct 2006 11:50:56 -0500 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: Using ActiveMQ from .NET compact framework In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 10/10/06, Oleg Deribas wrote: > Hello, > > James Strachan said the following on 10.10.2006 15:38: > > >> It seems that this mailing list doesn't accept attachments... :-( > > > > yeah - though you can attach stuff to the website wiki or JIRA > > Should I create issue regarding compact framework compatibility in jira? Yes please > > >> >> with activemq project - it uses Monitor.PulseAll and Monitor.Wait > >> >> methods not supported by compact framework. I'll try to investigate if > >> >> it is possible to avoid these methods usage. > >> > > >> > I wonder if there's an alternative way of doing these kinds of > >> > monitors / semaphores in .Net? > >> > >> Yes. Possibly it could be done just with plain locks. I'm currently > >> trying to do so. > > > > Note that we use lock a fair bit, we're using Monitor for inter-thread > > notifications rather than mutually exclusive locking. Or idd I > > misunderstand you there? > > I think it is possible to replace Monitor.Wait(semaphore, maxWait) with: > > Monitor.Exit(semaphore); > autoResetEvent.WaitOne(maxWait, false); > Monitor.Enter(semaphore); > > and Monitor.PulseAll(semaphore) with: > > Monitor.Exit(semaphore); > autoResetEvent.Set(); > Monitor.Enter(semaphore); > > but maybe, class which uses AutoResetEvent should implement IDisposable > interface and call autoResetEvent.Close() in Dispose method. Great thanks! -- James ------- http://radio.weblogs.com/0112098/