On Oct 16, 2003, at 7:21 AM, Dan Sugalski wrote:

On Thu, 16 Oct 2003, Leopold Toetsch wrote:

Juergen Boemmels <[EMAIL PROTECTED]> wrote:
Leopold Toetsch <[EMAIL PROTECTED]> writes:

The IMCC_INFO does not need to be part of the interpreter.

I don't like to have global state variables around. I don't know yet, what happens if 2 interpreter threads both do eval()...

If it's per-interpreter, nothing, since each thread should have its own intepreter. (Though I can see some potential deadlock issues, though that's not specific to this)

The lex-generated stuff that Juergen mentioned could be more of a problem, since it seems to store its state in globals (yytext, etc.), and that might be pretty tricky to "fix". I've always worried about the apparent lack of thread-safety of such generated lexers/parsers when I've run across them before, and wondered why they don't pass around a context structure instead. (I suppose the tools are old enough that they may actually pre-date threading as a widespread concept....)


JEff



Reply via email to