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

  • Home
  • SEARCH
  • 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 534997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:40:13+00:00 2026-05-13T09:40:13+00:00

I am uploading files to s3 using amazons s3 web service. It takes about

  • 0

I am uploading files to s3 using amazons s3 web service.

It takes about 1 second per file, is there a way I could fire up multiple threads to do this in parallel?

Say I have a method that does the upload call:

public void uploadToS3(string filename);

how can I call fire up 3 threads and each make this call?

  • 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-13T09:40:14+00:00Added an answer on May 13, 2026 at 9:40 am

    Wrap your function in a Runnable interface

    public Runnable getS3UploadTask () {
       return new Runnable() {
           public void run() {
               uploadToS3();
           }
       };
    }
    

    and, then you can create as many threads as you please to execute the Runnable:

    public void startS3Tasks(int workerCnt) {
        for(int i=0; i<workerCnt; i++) {
           new Thread(getS3UploadTask()).start();
        }
    }
    

    [Edit: of course, the above is only addressing your issue of “how to” and may be entirely irrelevant to the goal of improving uploads ;)]

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

Sidebar

Related Questions

Do web browsers send the file size in the http header when uploading a
I'm uploading files to my public/files folder of a Rails application on a constant
This question originally asked which is the best method for uploading files via SFTP
I'm trying to make a webpage that allows the uploading of multiple files at
When uploading a file (jpeg) via a form in IE7 I am seeing a
I am writing code for uploading a file from a client to my server
I am running Ubuntu8.041. Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch configured Can't get file uploading
To facilitate uploading on our web application we install/load an ActiveX control on the
I'm upgrading an app with many different settings files from XP to Vista and
Our clients will be uploading images to be printed on their documents and we

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.