Begin forwarded message:
From: Igor Stasenko <siguctua@gmail.com> Date: April 18, 2010 2:51:55 AM GMT+02:00 To: Squeak Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org> Subject: Re: [Vm-dev] InputSemaphore on Windows Reply-To: Squeak Virtual Machine Development Discussion <vm-dev@lists.squeakfoundation.org>
On 16 April 2010 01:18, Henrik Sperre Johansen <henrik.s.johansen@veloxit.no> wrote:
Is there a reason why this isn't signalled when inputSemaphoreIndex > 0?
In sqWin32Window.c, the comment for synchronizedSignalSemaphoreWithIndex looks somewhat scary... But looking at the svn logs, it seems it never was used in the record...Event() functions at all, so I wondered if a problem was encountered before svn was in use that lead to its removal, or if it's just not done by default?
This function is not called, because recordXXXEvent() is already synchronous because VM calls handleEvents(), and during that, no interpreter activity is possible, so it is safe to modify an input semaphore state directly. The synchronizedSignalSemaphoreWithIndex() is used only for cases, when you need to signal a semaphore from other thread, than interpreter runs in.
Cheers, Henry
-- Best regards, Igor Stasenko AKA sig.