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

Andreas Raab Andreas.Raab at gmx.de
Sun Aug 25 20:31:47 UTC 2002


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.

> 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).

Cheers,
  - Andreas




More information about the Squeak-dev mailing list