Skip to content

Commit

Permalink
7.40
Browse files Browse the repository at this point in the history
ChunkWriter sync trying to improve chunk join speed 2
  • Loading branch information
tonikelope committed Jan 13, 2021
1 parent 1b8467c commit e503ee5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>7.39</version>
<version>7.40</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/tonikelope/megabasterd/ChunkWriterManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,21 @@ public void run() {
if (_file_size > 0) {
while (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {

if (!download_finished && _download.getProgress() == _file_size) {

_download.getMain_panel().getDownload_manager().getTransference_running_list().remove(_download);
_download.getMain_panel().getDownload_manager().secureNotify();

_download.getView().printStatusNormal("Download finished. Joining file chunks, please wait...");
_download.getView().getPause_button().setVisible(false);
_download.getMain_panel().getGlobal_dl_speed().detachTransference(_download);
_download.getView().getSpeed_label().setVisible(false);
_download.getView().getSlots_label().setVisible(false);
_download.getView().getSlot_status_label().setVisible(false);
_download.getView().getSlots_spinner().setVisible(false);
download_finished = true;
}

synchronized (ChunkWriterManager.class) {

boolean chunk_io_error;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tonikelope/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*/
public final class MainPanel {

public static final String VERSION = "7.39";
public static final String VERSION = "7.40";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
Expand Down
Binary file modified src/main/resources/images/mbasterd_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e503ee5

Please sign in to comment.