Re: The best way to yield processor to other users for long-runnin
From: Mike D Sutton (EDais_at_mvps.org)
Date: 01/13/05
- Next message: Jim Mack: "Re: Copying string to byte array"
- Previous message: MikeD: "Re: Install VB service package"
- In reply to: Paul fpvt2: "Re: The best way to yield processor to other users for long-runnin"
- Next in thread: Paul fpvt2: "Re: The best way to yield processor to other users for long-runnin"
- Reply: Paul fpvt2: "Re: The best way to yield processor to other users for long-runnin"
- Reply: Tony Proctor: "Re: The best way to yield processor to other users for long-runnin"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 01:10:15 -0000
> Somebody suggested to create a separate thread for every request that client
> requested. If another request is made another thread would be instantiated.
> Can the above be done with ActiveX exe ? If not , how can I create a
> separate thread in VB ?
Yup, but it may be an idea to put an upper cap on how many requests can be run asynchronously, for a start while the system will
manage them it will be splitting it's processing speed between them so the more that are running at any one time, the slower each
will run.
It would be better to keep a 'thread pool' (or in this case an ActiveX EXE pool) of a set number of objects and simply re-use these
once one finishes it's job assuming you have lots of requests.
I'd suggest having a look around for examples on this if you're unsure of the implementation details since which should answer your
questions on the subject.
Unfortunately you can't simply create other threads in VB (at least not without some serious hacking) so the ActiveX EXE method,
which runs in its own thread, is about as close as you get unless you want to migrate that section of code to another language that
properly supports threading.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://EDais.mvps.org/
- Next message: Jim Mack: "Re: Copying string to byte array"
- Previous message: MikeD: "Re: Install VB service package"
- In reply to: Paul fpvt2: "Re: The best way to yield processor to other users for long-runnin"
- Next in thread: Paul fpvt2: "Re: The best way to yield processor to other users for long-runnin"
- Reply: Paul fpvt2: "Re: The best way to yield processor to other users for long-runnin"
- Reply: Tony Proctor: "Re: The best way to yield processor to other users for long-runnin"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|