mirror of
https://github.com/tonikelope/megabasterd.git
synced 2025-05-01 15:14:29 +02:00
7.39
ChunkWriter sync trying to improve chunk join speed
This commit is contained in:
parent
5847ff5cca
commit
1b8467c7a6
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.tonikelope</groupId>
|
<groupId>com.tonikelope</groupId>
|
||||||
<artifactId>MegaBasterd</artifactId>
|
<artifactId>MegaBasterd</artifactId>
|
||||||
<version>7.38</version>
|
<version>7.39</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -159,6 +159,8 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
|
|||||||
if (_file_size > 0) {
|
if (_file_size > 0) {
|
||||||
while (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
while (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
||||||
|
|
||||||
|
synchronized (ChunkWriterManager.class) {
|
||||||
|
|
||||||
boolean chunk_io_error;
|
boolean chunk_io_error;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -216,6 +218,8 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
|
|||||||
}
|
}
|
||||||
} while (chunk_io_error);
|
} while (chunk_io_error);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
if (!_exit && (!_download.isStopped() || !_download.getChunkworkers().isEmpty()) && _bytes_written < _file_size) {
|
||||||
|
|
||||||
LOG.log(Level.INFO, "{0} ChunkWriterManager waiting for chunk [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _download.getFile_name()});
|
LOG.log(Level.INFO, "{0} ChunkWriterManager waiting for chunk [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _download.getFile_name()});
|
||||||
@ -223,6 +227,7 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
|
|||||||
secureWait();
|
secureWait();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_bytes_written == _file_size) {
|
if (_bytes_written == _file_size) {
|
||||||
|
@ -60,7 +60,7 @@ import javax.swing.UIManager;
|
|||||||
*/
|
*/
|
||||||
public final class MainPanel {
|
public final class MainPanel {
|
||||||
|
|
||||||
public static final String VERSION = "7.38";
|
public static final String VERSION = "7.39";
|
||||||
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
|
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 THROTTLE_SLICE_SIZE = 16 * 1024;
|
||||||
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 184 KiB |
Loading…
x
Reference in New Issue
Block a user