Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9290585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:27:16+00:00 2026-06-18T20:27:16+00:00

I am develping an app which load some url, parse them, keep them into

  • 0

I am develping an app which load some url, parse them, keep them into sqlite db and the UI will read the saved data and show them in controls. This progress should be done in almost an infinit loop. For having fast response i plan to read the data from db in main thread and have an other thread (background worker) to load the data and insert it into db. Is it logical and possible to run read and write process in dispatchertimer, one timer in main thread and the other inside the background worker? and how? Or does anyone have better idea?

main thread:
    DispatcherTimer _Timer1 = new DispatcherTimer();
                _Timer1.Interval = _Interval;
                _Timer1.Tick += _Timer1_Tick;
    void _Timer1_Tick(object sender, EventArgs e)
            {
               // read data from db and show in controls
             }

secondary thread:
    private void bw_DoWork(object sender, DoWorkEventArgs e)
    {
        BackgroundWorker worker = sender as BackgroundWorker;
        DispatcherTimer _Timer2 = new DispatcherTimer();
                _Timer2.Interval = _Interval;
                _Timer2.Tick += _Timer2_Tick;


    }
    void _Timer2_Tick(object sender, EventArgs e)
            {
               // write data into db
             }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:27:18+00:00Added an answer on June 18, 2026 at 8:27 pm

    What you’re planning to do wont work.

    Both your _Timer1_Tick and _Timer2_Tick will run in the UI thread. If you perform some long-running operations there, it’ll hang the UI.

    I don’t get it, why do you need timers at all? Using timers for anything else but measuring time intervals is rarely a good strategy. You could e.g. run your update process in the infinite loop in background, as soon as it put new data in the DB you call Dispatcher.BeginInvoke (passing any data you want) to notify your UI thread it should update itself with the newly available data.

    And by the way, for the tasks like “send HTTP request, wait response, parse, store, repeat”, the new async/await feature is a natural choice. For WP7 the functionality is available as “Async CTP” redistributable package for Visual Studio 2010, for WP8 it’s already integrated into the framework. There’re some compatibility issues between the 2, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing iPad app which reads data (around 5000 rows) from sqlite and
I am developing an app which will show some information in a detailview which
I'm developing an app which has a large amount of related form data to
I am developing an app which requires the phone to ring or make some
I am currently developing an app which will be on Android Market. How can
I am developing a unity app, in which i call webservice for image url
I am developing an app in which user will take Picture from camera and
I am currently developing a web-app in which i am using a SQLite database.
I am developing an Android app, which retrieves some images from the internet and
I am having some issues getting tiles to load into my MapView in android

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.