On Sun, Sep 14, 2003 at 04:51:38PM -0700, Jeff Hobbs wrote: > Expect is not a thread-safe extension. It would be easy to make > thread-safe with large locks (which you could even do with the > tcl level apis), but fine-grained thread-safety would be hard due > to the type of unix APIs used. > > That said, you should be able to make it work, but I would recommend > a pass through the APIs for gross thread-safety abuses first.
In that case, I won't be doing it, not right now anyway, as I don't anticipate using Expect much more than for this one thing I already have an exec solution for. But, it does sounds like something I might want to do sometime in the future, so: How sure are you that JUST adding mutex locks around chunks of Expect code would fix the thread-safety? Or would some of these locks likely need to be coordinated with AOLserver locks? AOLserver does some of its own internal mutex locking of non thread-safe library calls (maybe other resources too, I don't know), so I'd worry about Expect trying to call some of the same stuff, but not using the same lock... In which case the thread-safety problem should still be solvable, but noticeably more difficult, as AOLserver and Expect have to be made to share a lock. I've seen this before with other code. Actually, what is Tcl's mechanism for coordinating such locking across multiple C coded Tcl extensions? Does it have one? -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
