Skip to content

Commit

Permalink
chore(upgrade): upgrade version name(1.3.3->1.4.0) code(9->10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacksgong committed Oct 9, 2016
1 parent 859e382 commit 2d4fbe1
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,18 @@

> [CHANGELOG](https://github.com/Jacksgong/ThreadDebugger/blob/master/CHANGELOG.md)|[中文迭代日志](https://github.com/Jacksgong/ThreadDebugger/blob/master/CHANGELOG_zh.md)
## Version 1.4.0

_2016-10-09_

#### New Interfaces

- Add `ThreadPools#newNoCorePool`: If there are `threadCount` tasks are running, the further task will be enqueued to the waiting queue, and will be executed when the size of running tasks less than `threadCount`. If the thread in this pool is turn to idle and the interval time of waiting for new tasks more `keepAliveTime`, it will be terminate to reduce the cost of resources.

#### Enhancement

- Improve Stability: If `corePoolSize` is equal to` 0` when `ThreadPools.newExceedWaitPool` is called, then we will create` NoCorePool` instead of `ExceedWaitPool` to avoid the small probability of `StackOverflow` because `getActiveCount()` may return `0` when `corePoolSize` is `0` in `ExceedWaitPool` and performs a large number of tasks at high frequencies, but the actual running thread The number is greater than `0`.

## Version 1.3.3

_2016-09-11_
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG_zh.md
Expand Up @@ -2,6 +2,18 @@

> [CHANGELOG](https://github.com/Jacksgong/ThreadDebugger/blob/master/CHANGELOG.md)|[中文迭代日志](https://github.com/Jacksgong/ThreadDebugger/blob/master/CHANGELOG_zh.md)
## Version 1.4.0

_2016-10-09_

#### 新接口

- 新增 `ThreadPools#newNoCorePool`: 如果有`threadCount`个数的任务正在运行,再增加进来的任务将会进入等待队列中直到有线程空闲出来。如果空闲线程空闲的时间大于`keepAliveTime`,那么它将会被回收。

#### 性能与提高

- 提高稳定性: 如果在调用`ThreadPools.newExceedWaitPool`时,所提供的`corePoolSize`等于`0`,那么我们会创建`NoCorePool`而非`ExceedWaitPool`,以此避免在高并发调度`ExceedWaitPool`的时候小概率出现`StackOverflow`的异常,因为在`ExceedWaitPool`中当`corePoolSize``0`并且高频率执行大量任务的时候,`getActiveCount()`的返回值有可能是`0`,但是实际的运行中的线程数是大于`0`的。

## Version 1.3.3

_2016-09-11_
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -29,10 +29,10 @@ ThreadDebugger and ThreadPool is installed by adding the following dependency to
```groovy
dependencies {
// If you need use ThreadDebugger.
debugCompile 'cn.dreamtobe.threaddebugger:threaddebugger:1.3.3'
releaseCompile 'cn.dreamtobe.threaddebugger:threaddebugger-no-op:1.3.3'
debugCompile 'cn.dreamtobe.threaddebugger:threaddebugger:1.4.0'
releaseCompile 'cn.dreamtobe.threaddebugger:threaddebugger-no-op:1.4.0'
// If you need use ThreadPool.
compile 'cn.dreamtobe.threaddebugger:threadpool:1.3.3'
compile 'cn.dreamtobe.threaddebugger:threadpool:1.4.0'
}
```

Expand Down
6 changes: 3 additions & 3 deletions README_zh.md
Expand Up @@ -29,10 +29,10 @@ ThreadDebugger是一个简单易用的线程调试器,可以帮助您随时查
```groovy
dependencies {
// If you need use ThreadDebugger.
debugCompile 'cn.dreamtobe.threaddebugger:threaddebugger:1.3.3'
releaseCompile 'cn.dreamtobe.threaddebugger:threaddebugger-no-op:1.3.3'
debugCompile 'cn.dreamtobe.threaddebugger:threaddebugger:1.4.0'
releaseCompile 'cn.dreamtobe.threaddebugger:threaddebugger-no-op:1.4.0'
// If you need use ThreadPool.
compile 'cn.dreamtobe.threaddebugger:threadpool:1.3.3'
compile 'cn.dreamtobe.threaddebugger:threadpool:1.4.0'
}
```

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
@@ -1,5 +1,5 @@
VERSION_NAME=1.3.3
VERSION_CODE=9
VERSION_NAME=1.4.0
VERSION_CODE=10
BUILD_TOOLS_VERSION=24.0.2
COMPILE_SDK_VERSION=24

Expand Down

0 comments on commit 2d4fbe1

Please sign in to comment.