realbasic-nug
[Top] [All Lists]

Re: Semaphore

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Semaphore
From: Charles Yeomans <charles at declareSub dot com>
Date: Sat, 30 Jun 2007 12:10:09 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <DC0576DE-0186-472A-8D4E-7E629B6E7A74 at isticky dot net>
On Jun 30, 2007, at 7:40 AM, Jaap Cammeraat wrote:

> Hi All,
>
> I'm using a semaphore to stop executing some code but it isn't  
> working.
> Am I doing something stupid?

Yes; you're using a Semaphore incorrectly :)

>
> ---
> wait=new Semaphore
> wait.Signal     // lock this thing
> wait.Signal     // try to lock again
> Beep     // you will never make sound unless there is somewhere
> a .Release
> ---
>
> In my App this code will run and make a sound.
> There is no .Release of this semaphore in my code.


Probably what you want is to use app.SleepCurrentThread or  
something.  If you could explain the problem you're trying to solve,  
perhaps we can suggest a solution.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>