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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:48:47+00:00 2026-06-09T23:48:47+00:00

I have the following task: Download image from web Create another image using it

  • 0

I have the following task:

  1. Download image from web
  2. Create another image using it
  3. Save image to SD card and show it

I need to do every step into another thread.
It seems, that when I’m done with loading image I need to transfer it into second thread.

After some googling I realized that I need to implement Callable interface to each thread and than use it with ExecutorService. The problem is that I don’t understant how to pass data, for example, from first thread to second.

Can anyone show a simple example of it? thanks

  • 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-09T23:48:49+00:00Added an answer on June 9, 2026 at 11:48 pm

    Use BlockingQueue and a Producer-Consumer pattern.

    In this approach, the first thread will download your images and put them inside the queue.
    The second thread will wait until something appears inside the queue, transform the image, and put it in another queue, that the third thread will wait for.

    Read the articles I’ve linked to for more explanation and a working example of the Producer-Consumer pattern.

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

Sidebar

Related Questions

I have the following task: download a file using HTTPS and authentication. Indy seems
I have following task: I need to connect to FTP server and download data
I have the following task: there are a simple table from mysql database: <html>
I have the following situation: var Task = Backbone.Model.extend({ initialize: function() { }, save:
Let's say I have the following class hierarchy: TaskViewer inherits from ListViewer<Task> which in
Guys I'm new to xml in Java. I have the following task. I need
I have following string task BLABLA@{taskId} @{BLABLA.title} and want to extract all placeholders from
I want to accomplish the following task. I have an web application through which
I have the following task: Create one website which is accessible with 20 different
I have the following task: namespace :db do desc Drop, create, migrate, seed the

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.