[VM][Win32] Can plugin DLL use synchronizedSignalSemaphoreWithIndex()?

David T. Lewis lewis at mail.msen.com
Sun Aug 25 21:40:48 UTC 2002


On Sun, Aug 25, 2002 at 10:31:47PM +0200, Andreas Raab wrote:
> David,
> 
> > It seems to work with one pipe, but when
> > I test it with lots of pipes reading and writing at once,
> > I'm able to generate all kinds of horrible failures. One
> > of the failure symptoms is lost signals, but I'm certainly
> > not at the point where I understand the root cause.
> 
> Try to "serialize" the calls to signalSemaphoreWithIndex on your own and
> see if this helps with the many pipes (e.g., do your own version of
> synchronizedSemaphoreWithIndex). If this helps I'd guess that we *do*
> still have a problem with signaling semaphores correctly. Next step
> would be to add a mutex to the VM (just hack the code in
> signalSemaphoreWithIndex and checkForInterrupt) to see if that
> completely solves the problem. If it does I'd be willing to look into
> the problem.

I tried step one, and it seems to make things worse. That suggests that
there is something else wrong in my code (highly probable). I'll keep
looking, and will let you know if step two seems to be required.

> > p.s. Alternative design suggestions for a non-blocking Win32 
> > pipe would be welcome. As near as I can figure, threads are
> > how this sort of thing is done on Windows, but maybe I'm missing
> > something.
> 
> Threads are the "portable way" of doing it but you might consider using
> completion routines (which will work on any NT-based kernel).

OK, I want it to be portable, so it sounds like threads are the right
approach.

Thank you!

Dave




More information about the Squeak-dev mailing list