[Openmcl-devel] Thread interrupts not reliable on Windows?

Matthew Stickney mtstickney at gmail.com
Tue Nov 14 14:51:21 PST 2017


Recently I've been trying to debug a multi-threaded application that
falls over under load. The application was originally done in SBCL,
but when ported to CCL, it would consistently bail out into a debugger
during a SetThreadContext() call.

At some point, I came across some of Anton Kovalenko's notes[1] about
SBCL, which included a reference[2] that says the
SuspendThread/SetThreadContext/ResumeThread approach to delivering
thread interrupts doesn't really work (for example, "volatile"
registers like eax aren't saved or restored).

I'm afraid I'm not very familiar with Windows internals, and I've only
just dipped into the CCL code. Is this something that people are aware
of and have worked around, or is this likely to be an issue in
current versions?

-Matt Stickney

[1] http://dmitryvk.github.io/sbcl-win32-threads/implementation-notes.html
[2] http://translate.google.com/translate?js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&sl=ru&tl=en&u=http://blog.not-a-kernel-guy.com/2010/05/04/812



More information about the Openmcl-devel mailing list