github.com/timandy/routine@v1.1.4/CHANGELOG.md (about) 1 <!--变更日志--> 2 3 # v1.1.4 Release notes 4 5 ### Features 6 7 - Support go version range `go1.18` ~ `go1.23`(New support `go1.23`). 8 9 ### Changes 10 11 - Fix interface conversion error: getting nil value from ThreadLocal[T], where T is interface type. 12 - Update copyright. 13 14 # Links 15 16 - Source code [https://github.com/timandy/routine/tree/v1.1.4](https://github.com/timandy/routine/tree/v1.1.4) 17 18 --- 19 20 # v1.1.3 Release notes 21 22 ### Features 23 24 - Support go version range `go1.18` ~ `go1.21`. 25 - Support `generic` programming. 26 27 # Links 28 29 - Source code [https://github.com/timandy/routine/tree/v1.1.3](https://github.com/timandy/routine/tree/v1.1.3) 30 31 --- 32 33 # v1.1.2 Release notes 34 35 ### Features 36 37 - Support go version range `go1.13` ~ `go1.21`(New support `go1.21`). 38 - Support capture values of `InheritableThreadLocal` by `WrapTask()`, `WrapWaitTask()` and `WrapWaitResultTask()` methods. 39 - Support run `FutureTask` by `FutureTask.Run()` method. 40 - Define function type `Runnable` and `FutureCallable`. 41 42 ### Changes 43 44 - Rename type `Future` to `FutureTask`. 45 - Skip first runtime panic stack automatically for `RuntimeError`. 46 47 # Links 48 49 - Source code [https://github.com/timandy/routine/tree/v1.1.2](https://github.com/timandy/routine/tree/v1.1.2) 50 51 --- 52 53 # v1.1.1 Release notes 54 55 ### Features 56 57 - Support go version range `go1.13` ~ `go1.20`(New support `go1.20`). 58 59 ### Changes 60 61 - Fix a memory leak risk caused by Timer. 62 - Reduce memory by using less chan. 63 - Update copyright. 64 65 # Links 66 67 - Source code [https://github.com/timandy/routine/tree/v1.1.1](https://github.com/timandy/routine/tree/v1.1.1) 68 69 --- 70 71 # v1.1.0 Release notes 72 73 ### Features 74 75 - Support more arch `loong64`, `mips`, `mipsle`, `mips64`, `mips64le`, `ppc64le`, `riscv64`, `wasm`. 76 77 ### Changes 78 79 - Upgrade dependencies to the latest version. 80 - Modify continuous integration script to support go1.19. 81 82 # Links 83 84 - Source code [https://github.com/timandy/routine/tree/v1.1.0](https://github.com/timandy/routine/tree/v1.1.0) 85 86 --- 87 88 # v1.0.9 Release notes 89 90 ### Features 91 92 - Support arch `386` & `amd64` on `freebsd` and arch `ppc64` & `s390x` on `linux`. 93 - Support `Cancel()` and `GetWithTimeout()` methods for type `Future`. 94 - Support checking whether the tasks created by `GoWait(CancelRunnable)` and `GoWaitResult(CancelCallable)` methods are canceled. 95 96 ### Changes 97 98 - Fix spell error of type `Future`. 99 - Rename type `Any` to `any`. 100 101 # Links 102 103 - Source code [https://github.com/timandy/routine/tree/v1.0.9](https://github.com/timandy/routine/tree/v1.0.9) 104 105 --- 106 107 # v1.0.8 Release notes 108 109 ### Changes 110 111 - Rename `StackError` to `RuntimeError`. 112 - Support error nesting for `RuntimeError`. 113 - Beautify the error message of `RuntimeError`. 114 - Remove `bytesconv.Bytes()` and `bytesconv.String()` methods. 115 - Restore to the previous value if an overflow occurs when getting the index of `ThreadLocal`. 116 117 # Links 118 119 - Source code [https://github.com/timandy/routine/tree/v1.0.8](https://github.com/timandy/routine/tree/v1.0.8) 120 121 --- 122 123 # v1.0.7 Release notes 124 125 ### Bugs 126 127 - Fix released `thread` struct may be resurrected from invalid memory and cause fault error. 128 129 ### Changes 130 131 - Modify the error message format of `StackError`. 132 - Define function type `Supplier` for `threadLocal` and `inheritableThreadLocal` types. 133 - Define function type `Runnable` and `Callable` for `Go(Runnable)`, `GoWait(Runnable)` and `GoWaitResult(Callable)` methods. 134 135 # Links 136 137 - Source code [https://github.com/timandy/routine/tree/v1.0.7](https://github.com/timandy/routine/tree/v1.0.7) 138 139 --- 140 141 # v1.0.6 Release notes 142 143 ### Bugs 144 145 - Fix fault error when pprof is running. 146 147 ### Features 148 149 - Support more architectures `386`, `amd64`, `armv6`, `armv7`, `arm64`. 150 151 ### Changes 152 153 - Read and write `coroutine` information through the `gohack` library, theoretically support unreleased `go` versions in the future. 154 - When `runtime.g` cannot be obtained natively, `panic` directly instead of falling back to invoke `runtime.Stack()` method. 155 - Remove api `ThreadLocal.Id()`. 156 157 # Links 158 159 - Source code [https://github.com/timandy/routine/tree/v1.0.6](https://github.com/timandy/routine/tree/v1.0.6) 160 161 --- 162 163 # v1.0.5 Release notes 164 165 ### Features 166 167 - Support go version range `go1.13` ~ `go1.18`(New support `go1.18`). 168 169 ### Changes 170 171 - Change license to `Apache-2.0`. 172 - Upgrade dependencies to the latest version. 173 174 # Links 175 176 - Source code [https://github.com/timandy/routine/tree/v1.0.5](https://github.com/timandy/routine/tree/v1.0.5) 177 178 --- 179 180 # v1.0.4 Release notes 181 182 ### Features 183 184 - Add zero-copy conversion method between `bytes` and `string`, see `bytesconv.Bytes()` and `bytesconv.String()` methods. 185 186 ### Changes 187 188 - Modify the garbage collection mechanism, remove `gcTimer`, no longer perform garbage collection through timers. 189 - Store the context in the `g.labels` field of the coroutine structure which will be set to `nil` after coroutine ends. The context data will be collected at the next `GC`. 190 - Use `go:linkname` to invoke assembly code `getg()` directly to improve performance. 191 - Implement the `getGoidByStack()` method by invoke `http.http2curGoroutineID()`. 192 - Remove api `AllGoids()` and `ForeachGoid()`. 193 194 # Links 195 196 - Source code [https://github.com/timandy/routine/tree/v1.0.4](https://github.com/timandy/routine/tree/v1.0.4) 197 198 --- 199 200 # v1.0.3 Release notes 201 202 ### Features 203 204 - Support copy `Cloneable` objects to sub goroutine when create sub goroutines by `Go()`, `GoWait()` and `GoWaitResult()` methods. 205 - Add api `ForeachGoid(func(goid int64))` to run a func for each goid. 206 207 ### Changes 208 209 - Support go version range `go1.13` ~ `go1.17`(Not support `go1.12` anymore). 210 - Use segment locks to reduce competition and improve `ThreadLocal`'s `read`, `write` and `gc` performance. 211 - Get all goids through `runtime.allgs` instead of `runtime.atomicAllG`, so `go1.13` ~ `go1.15` can also get all goids natively. 212 213 # Links 214 215 - Source code [https://github.com/timandy/routine/tree/v1.0.3](https://github.com/timandy/routine/tree/v1.0.3) 216 217 --- 218 219 # v1.0.2 Release notes 220 221 ### Bugs 222 223 - Fix bug in `getAllGoidByStack()` method, Buffer may too small when dump all stack info. 224 225 ### Features 226 227 - Support initialize value when first get from `ThreadLocal`. 228 - Add `StackError` to catch stack info. 229 - Add `Feature` to wait goroutine finished or get result from goroutine. 230 - Add api `NewThreadLocalWithInitial()`, `NewInheritableThreadLocal()` and `NewInheritableThreadLocalWithInitial()`. 231 - Support Inherit values of `ThreadLocal` by `Go`, `GoWait()` and `GoWaitResult()`. 232 233 ### Changes 234 235 - Rename `LocalStorage` to `ThreadLocal`. 236 - Remove api `Clear()`, `InheritContext()` and `RestoreContext()`. 237 - Improve `gc` performance by reducing the number of for loops. 238 239 # Links 240 241 - Source code [https://github.com/timandy/routine/tree/v1.0.2](https://github.com/timandy/routine/tree/v1.0.2) 242 243 --- 244 245 # v1.0.1 Release notes 246 247 ### Features 248 249 - Improve performance by use slice to store goroutine local values. 250 - Optimize `clearDeadStore()` method. 251 252 # Links 253 254 - Source code [https://github.com/timandy/routine/tree/v1.0.1](https://github.com/timandy/routine/tree/v1.0.1) 255 256 --- 257 258 # v1.0.0 Release notes 259 260 `This is the first stable version available for production. It is highly recommended to upgrade to this version if you have used a previous version.` 261 262 ### Bugs 263 264 - Fix `NewLocalStorage()` always return the same value, so we can define multi `LocalStorage` instances. 265 - Fix `NewLocalStorage()` clear other `LocalStorage`'s value. 266 - Fix `RestoreContext()` not clear values when restore from empty `*ImmutableContext`. 267 268 ### Features 269 270 - Not force create `store` when invoke `Get()`, `Remove()`, `Clear()`, `BackupContext()` methods to reduce memory usage. 271 272 ### Changes 273 274 - Rename `InheritContext()` to `RestoreContext()`. 275 - Rename `Del()` to `Remove()`. 276 - Move Clear() method to `routine` package. 277 278 # Links 279 280 - Source code [https://github.com/timandy/routine/tree/v1.0.0](https://github.com/timandy/routine/tree/v1.0.0) 281 282 --- 283 284 # v0.0.2 Release notes 285 286 ### Features 287 288 - Support go version range `go1.12` ~ `go1.17`(New support `go1.17`). 289 - Enable GitHub actions for continuous integration. 290 291 ### Known Issues 292 293 - `NewLocalStorage()` always return the same value. 294 295 # Links 296 297 - Source code [https://github.com/timandy/routine/tree/v0.0.2](https://github.com/timandy/routine/tree/v0.0.2) 298 299 --- 300 301 # v0.0.1 Release notes 302 303 ### Features 304 305 - Support go version range `go1.12` ~ `go1.16`. 306 - Support `Goid()` to get current goroutine id. 307 - Support `AllGoids` to get all goroutine ids. 308 - Support `ThreadLocal` to save values ingo to goroutine. 309 310 ### Known Issues 311 312 - `NewLocalStorage()` always return the same value. 313 314 # Links 315 316 - Source code [https://github.com/timandy/routine/tree/v0.0.1](https://github.com/timandy/routine/tree/v0.0.1)