Re: Multiple File Upload - WeOnlyDo Discussion board

Re: Multiple File Upload (General questions)

by wodSupport, Tuesday, November 16, 2004, 04:06 (7110 days ago) @ michael090

I looked at the source. Didn't try it yet but I think I see the problem. You are using Blocking *AND* events. You shouldn't be doing that. Let me explain.

Each command you call blocks. 'Connect' blocks. 'PutFile' blocks.

So, you call
1. Connect (your thread blocks),
2. we do something under the hood,
3. we fire 'Connected' event,
4. we unblock so you can proceeed.

now, imagine you call 'PutFile' between 3 and 4 - so you cause second blocking to occur - and app freezes.

In order to avoid this problem you should NOT execute blocking methods from within event code. So, you can
a) set Blocking = False and change your code a bit so it works in async manner (we call you when something is done)
b) move code from 'Connected' event to just after calling 'Connect' method.

Can you try that?


Complete thread: