VB.NET queue handling issue

I need a VB.NET Forms application that processes a queue. It basically needs to ping the web service every 30 seconds and then upload documents to the document management system if there is any load.

How should I implement this? Using a loop? Do I need to watch streams?

thank

0


source to share


4 answers


If you are already using web services, you may want to stay with thread-like service behavior with fewer complications.



Otherwise, just use a Timer object or FileSystemWatcher if possible for your triggers.

+2


source


How did you define the queue. You can do this with mutlithreading (i.e. create a threadpool instance) and let the threadpool invoke objects on the queue.



However, if you have something like searching for files in queue objects, then obvsiouly you need the first objec to end before starting the second (that is, if they are using the same file).

+1


source


use System.Windows.Forms.Timer, set interval to 30000ms (30 seconds)

use System.Collections.Generic queue initialized with Enqueue

has a method, past the timer, fetching the next item from the queue (presumably a web service url) using Dequeue and processing it

crude but effective

+1


source


+1


source







All Articles