Transfermanager download multiple files






















The two automatics are destroyed or their refCount decremented and destroyed if the refCount is zero. I suspect the worker threads are continuing to run. Using the simple async code at the top of this issue, I can reproduce a crash that usually occurs one of two places. FYI, you can remove the entire transferConfig. It will crash without it. If not used, and your function ends, the crash occurs. Therefore, the async scenarios have not been tested. No known workaround.

You must use WaitUntilFinished. WaitUntilFinished is one way to achieve that. You can do that in other ways depending on your application's logic.

You are right about the parameter type in the callback. Actually, we do ensure the lifetime of TransferManager outlasts the worker threads. So, even though you're getting a raw pointer to TansferManager in the callback, it's guaranteed to be a valid pointer and not a dangling one.

This is not a console "I only have a main , only one main thread, and then I die" application. Instead, this is a windows app which has UI stuff going on. Insert the example code at the top in that class.

With the files, just send one file You should get a crash. The thread that calls myupload will zoom through the entirely of the method in a few milliseconds and exit the method. Meanwhile, a worker thread somewhere is trying to upload.

And then a crash. To summarize this thread, there're two separate issues at hand here:. Dual interfaces. Or make an additional interface " Ex" ;- Ack-ack! For 2 , I made time today to write a simple repro project of the crash. I used VS to make a boilerplate windows application. If you need to hack the source into a new VS project, then I am using the NuGet packages for aws, s3, and transfermgr.

The version is 1. I am statically linking all three packages. The app should be compiled using the v toolchain and make an Windows EXE file. I am not using precompiled headers. If you want to not crash. Then uncomment line 35 of MyS3. Please reopen this issue if you're still experiencing the same problem. Thank you. Skip to content. Star 1. New issue. Jump to bottom. Labels bug. Copy link. Setup SDK 1. Contributor Author. WithBucket hTransfer. WithKey hTransfer. WithUploadId hTransfer.

Active Oldest Votes. Improve this answer. Arcones Arcones 2, 2 2 gold badges 17 17 silver badges 39 39 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Who owns this outage?

Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related Hot Network Questions.



0コメント