Hello all,
I have a cooperative WebThread that performs database inserts and updates a progress bar to keep the user informed of progress of the operation (via UserInterfaceUpdate).
The UI remains responsive as the thread runs until completion (all records are inserted into the database table and the progress bar reports the progress accurately).
I then created a second cooperative WebThread that processes a second queue of db inserts.
It uses a second (discrete) connection to the db.
It updates a different table to the first thread.
I run both threads together:
- initially each having Low Priority (1)
- again with each Normal Priority (5)
During both attempts the progress bars progress for a while then eventually freeze.
Generally, one of the threads completes its db inserts (even though the progress bar does not confirm this) the other only gets part way through.
The app doesn’t crash in the IDE nor browser, however requires restarting, maybe some unhandled exception I have not trapped which I will investigate. No errors either with the try/catch on db inserts.
If I run each thread separately until completion they work fine, but that is not really the point of the exercise.
Should this approach currently work for web?
Thank you in. advance.
Kind regards, Andrew