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 889749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:37:02+00:00 2026-05-15T13:37:02+00:00

I have this problem in a project I’m working on: I have a list

  • 0

I have this problem in a project I’m working on:

I have a list of elements sent through a server, I have a local copy of that list each time the server calls my client’s update method.

The update method itself checks if the newly sent list is identical to the local copy, if not, modify the local copy. This means that if on the server, the element is no longer present, then it should be removed from the local copy.

The problem arises when the last element disappears on the server: once it does, the server stops calling the update method. This means that the local copy is left with a single element until the update method is called again, since it only gets called while the server has data to send.

Now I can’t change the server architecture or the fact that it doesn’t call the method when the list is empty. I can only modify the client side.

I’ve been experimenting with threads on my client to have some sort of thread running in parallel to clear the list if the list has not been updated in a while. This has not been working correctly or effectively, and I seem to get random results that can change completely just by changing how often the thread runs.

My main problem arises because I can’t seem to find an effective way to tell if I am actively receiving data or not. I also can’t seem to find a way to check if a thread is currently blocked or not.

Any ideas on how I can approach this problem? I’m not very good with threading/multi-threading and I’ve been bashing my head against this wall for a while now.

  • 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-05-15T13:37:02+00:00Added an answer on May 15, 2026 at 1:37 pm

    Seeing some code would help in providing a more specific answer, but if the approach you’ve pursued works on a conceptual level, you could take a look at Java’s Timer class and create a TimerTask that calls a method that checks when the list was last updated and clears it if appropriate.

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

Sidebar

Related Questions

I have this problem that is driving me insane. I have a project to
I'm working in image processing project, and I have this problem: If I made
I have this problem getting my newly created php project on Netbeans work on
Hey this is the weirdest problem i've ever encoutered, I have 2 projects that's
I have this problem: $id is id for each user $img = 'http://www.somesite.com/pictures/'; $no_img
I have this problem in a bigger Project...... so I set up a 'Testpoject'
I have this problem with the Android ActionBarCompat project: On emulators with Android 4.0
I have this problem in this scenario: 1-I made a new silverlight project with
i have this problem that i can't solve for days now...here is my code.
Working on a project, I have this issue where my array slicetable returns undefined

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.