help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with multithreading and slow compilation


From: Paul Eggert
Subject: Re: Problems with multithreading and slow compilation
Date: Wed, 07 Jul 2004 10:36:02 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

"Laurence Finston" <address@hidden> writes:

> I haven't examined the output closely enough to tell 
> whether the actual calls to `printf()' (or whatever Bison uses) 
> are interrupted, but I suspect they are.

Yes, this is the same problem that any multithreaded app would have
when writing to stdout.  POSIX says that printf is thread-safe, so you
shouldn't lose any output, but it may be arbitrarily interleaved with
other threads' output.


> Would the Bison developers have any interest in implementing 
> the following features? 
>
> 1) making it possible to redirect the debugging output to files, 
>    one for each invocation of `yyparse()'.
>
> 2) Protecting `stdout' and `stderr' with mutexes, to keep 
>    writes to these streams from being interrupted
>    (unless they are already, of course).

These both sound like worthy features.  Can you get the effect that
you want by defininig YYFPRINTF?  If so, then perhaps we just need to
make this sort of thing easier (since not everyone will think of doing
that).


> What I'd like is a way of breaking up the actions for the rules into
> multiple compilation units, so that only the parts that have changed
> will need to be recompiled.  Is this something the Bison developers
> might consider implementing?

We might consider it, yes, but it sounds hard.

> Have other users been having similar problems?

Nobody has written us about them that I recall.  But it sounds like
you're a fairly advanced user.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]