in reply to Re: Re: Starting multi-threading
in thread Starting multi-threading
Sorry! Bad guess. I did warn you I hadn't tried it.
Unfortunately, whilst the scripting object itself and OLE are reentrent, the means of getting to them from perl is not. Any attempt I make to use Win32::OLE from two threads at the same time, even if it is to two different OLE objects, the second one fails.
I took a quick scan at Win32::OLE but it doesn't look like it would be an easy thing to fix. It was written before threads were around, so reentrancy was never a consideration.
I had thought that by creating new instances in each thread, which under win32 is pretty much the same as creating different instances in seperate (pseudo-) processes, that it would isolate everything, but it would appear not.
As I said in the last post, I'm not sure how much you would have gained by threading for this anyway, but unless Win32::OLE gets an update some time soon, I don't see this being easily fixed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Starting multi-threading
by blackadder (Hermit) on Aug 24, 2003 at 20:41 UTC | |
by BrowserUk (Patriarch) on Aug 24, 2003 at 20:52 UTC | |
by liz (Monsignor) on Aug 24, 2003 at 21:21 UTC | |
by BrowserUk (Patriarch) on Aug 24, 2003 at 21:37 UTC |