Han-Wen Nienhuys <[email protected]> writes: > The lifetime of Threads (or whatever you call them) is tricky. Consider > > > <c( e...@1( g> > % * > % ..stuff.. > % > <d...@1) f)> > % ** > > How would LilyPond know that the @1 thread context must stay alive at > the point marked %* ? The iterator for the E note would be pointing at > the @1 Thread, but something else must copy the reference so it doesnt > die.
As long as a Thread has unfinished business, it would stay around. Alternatively, they stay alive until their voice dies. It is probably a bad idea to have Threads (or whatever) have their own property sets since we already have enough of a mess figuring out where \set xxx.yyy goes. If they are not full contexts with properties and so on, but basically just an event filter with on-demand engraver instances, maybe most of the complications don't arrive in practice. > Suppose you somehow save the reference to @1. How does lilypond know > the context should die at %** ? If it does not, you'll risk > accumulating them until the end of the piece, making things slow down. End of voice, or no pending business, I'd say. Of course, when you forget to close a spanning engraver, there will be pending business until end of voice. And then we'll get the error/warning message. I don't see this as problematic, but of course I have had no previous exposure to the last attempt. -- David Kastrup _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
