On Thursday, September 4, 2003, at 10:56 , Luke Palmer wrote:

Is there a problem with providing a mechanism which would suspend all threads except for the "current" one, as to ensure that the serialize operates, er, serially. Could it be implemented with a top-priority event post that acquires a global lock?

Problem? Well, it's is antithetical to threading...


Imagine a massively multithreaded server program. Stopping the entire thing to so much as C<dump(undef)>? The overhead of halting the threads in predictable states far exceeds the cost of the serialization itself. A server which ever availed itself of dump would become unable to saturate a multiprocessor system, and most likely unable to take advantage of a uniprocessor as well.

To serialize the entire interpreter (including thread state continuations), entering exclusive execution by halting all threads is probably necessary. In any other case? Ill-advised...



Gordon Henriksen
[EMAIL PROTECTED]

Reply via email to