On Aug 11, 2005, at 3:37 AM, Fabrice Pipart wrote:
Hi List !
I am still stuck in developing a large file upload framework (I
will publish it asa it is released!).
Here is my question :
Is there a way to choose the WorkerThread you use?
No, and there should not be. They are all the functionally the same.
or to notify that you want to check that the current one is not
actually used by another request?
I think you are misinterpreting what you are seeing. Worker threads
are not reused until they fully complete processing a request.
Is there a way to put a page reloading in a seperate thread?
I'm not sure what you mean here.
Quick description of why I ask such a question:
when you want to upload a file in my application, two portions of
code begin to run concurrently :
- one to manage the upload itself
- an other to refresh the progress bar
Is this from Jonathan Rochkind's code on www.wocode.com?
But currently I have a nasty problem : the refreshing of the
progress page uses the same WorkerThread as the upload... though
many other thread are "free"
Not seeing the code, I'm not sure what you are seeing here. They
should not be using the same worker thread. If both are referring to
the session then WO will block on the second request to check out the
session. If both are referring to the same editing context, your
code will also block there.
And also when you want to upload several files at the same time,
again, a thread already used by another upload tries to be accessed
and therefore the last upload has to wait for the first one to
finish.
But if you try to navigate in the application during the upload, it
works fine and it "seems" that the WorkerThread of the upload is
never attempted to be used.
So, why does the reload of the progress bar tries to use the same
WorkerThread ?
Does that get you any closer to understanding what is going wrong?
Chuck