On Sunday, 10 Sep 2000, Michael J. Hammel wrote:

> Thus spoke Marc Lehmann
> > Not in the current architecture. The caller is blocked until the called
> > plug-in has finished.
> That would be the preferred design, but my tests don't seem to bear this
> out.  Again, I could be misinterpreting the results, though I'm fairly
> certain I'm not.

>From your evidence with sleep() it does sound like the call to the
plugin is not blocking until the plugin returns.  I'm not sure whether
the call goes via the main application, or if the call goes directly.

Again, this is where per-image locks would help sort these kinds of
problems out.

I can see two solutions, discounting image locking ones:
  a) make calls to plugins from other plugins block properly, as you,
     Marc and presumably others expect.
  b) add an explicit gimp_wait_for_plugin() call which blocks until
     there are no outstanding operations on the image.

I don't particularly like b) since it's not obvious to a script writer
when it should be used.  But, it might be easier to do than a).  I
don't know, I haven't looked at the code.


Reply via email to