- Support capture and restore goroutine's context by
createInheritedMap()andrestoreInheritedMap()methods.
- Source code https://github.com/timandy/routine/tree/v1.1.6
- Fix missing nil check for the underlying data when copying the context of
InheritableThreadLocal.
- Support go version range
go1.18~go1.25(New supportgo1.24andgo1.25). - Add a new
static mode, which improves performance by over20%and provides higher memory safety by adding the compilation parameter-a -toolexec='routinex -v'.
- Modify the
goidtype touint64. - Update copyright.
- Source code https://github.com/timandy/routine/tree/v1.1.5
- Support go version range
go1.18~go1.23(New supportgo1.23).
- Fix interface conversion error: getting nil value from ThreadLocal[T], where T is interface type.
- Update copyright.
- Source code https://github.com/timandy/routine/tree/v1.1.4
- Support go version range
go1.18~go1.21. - Support
genericprogramming.
- Source code https://github.com/timandy/routine/tree/v1.1.3
- Support go version range
go1.13~go1.21(New supportgo1.21). - Support capture values of
InheritableThreadLocalbyWrapTask(),WrapWaitTask()andWrapWaitResultTask()methods. - Support run
FutureTaskbyFutureTask.Run()method. - Define function type
RunnableandFutureCallable.
- Rename type
FuturetoFutureTask. - Skip first runtime panic stack automatically for
RuntimeError.
- Source code https://github.com/timandy/routine/tree/v1.1.2
- Support go version range
go1.13~go1.20(New supportgo1.20).
- Fix a memory leak risk caused by Timer.
- Reduce memory by using less chan.
- Update copyright.
- Source code https://github.com/timandy/routine/tree/v1.1.1
- Support more arch
loong64,mips,mipsle,mips64,mips64le,ppc64le,riscv64,wasm.
- Upgrade dependencies to the latest version.
- Modify continuous integration script to support go1.19.
- Source code https://github.com/timandy/routine/tree/v1.1.0
- Support arch
386&amd64onfreebsdand archppc64&s390xonlinux. - Support
Cancel()andGetWithTimeout()methods for typeFuture. - Support checking whether the tasks created by
GoWait(CancelRunnable)andGoWaitResult(CancelCallable)methods are canceled.
- Fix spell error of type
Future. - Rename type
Anytoany.
- Source code https://github.com/timandy/routine/tree/v1.0.9
- Rename
StackErrortoRuntimeError. - Support error nesting for
RuntimeError. - Beautify the error message of
RuntimeError. - Remove
bytesconv.Bytes()andbytesconv.String()methods. - Restore to the previous value if an overflow occurs when getting the index of
ThreadLocal.
- Source code https://github.com/timandy/routine/tree/v1.0.8
- Fix released
threadstruct may be resurrected from invalid memory and cause fault error.
- Modify the error message format of
StackError. - Define function type
SupplierforthreadLocalandinheritableThreadLocaltypes. - Define function type
RunnableandCallableforGo(Runnable),GoWait(Runnable)andGoWaitResult(Callable)methods.
- Source code https://github.com/timandy/routine/tree/v1.0.7
- Fix fault error when pprof is running.
- Support more architectures
386,amd64,armv6,armv7,arm64.
- Read and write
coroutineinformation through thegohacklibrary, theoretically support unreleasedgoversions in the future. - When
runtime.gcannot be obtained natively,panicdirectly instead of falling back to invokeruntime.Stack()method. - Remove api
ThreadLocal.Id().
- Source code https://github.com/timandy/routine/tree/v1.0.6
- Support go version range
go1.13~go1.18(New supportgo1.18).
- Change license to
Apache-2.0. - Upgrade dependencies to the latest version.
- Source code https://github.com/timandy/routine/tree/v1.0.5
- Add zero-copy conversion method between
bytesandstring, seebytesconv.Bytes()andbytesconv.String()methods.
- Modify the garbage collection mechanism, remove
gcTimer, no longer perform garbage collection through timers. - Store the context in the
g.labelsfield of the coroutine structure which will be set tonilafter coroutine ends. The context data will be collected at the nextGC. - Use
go:linknameto invoke assembly codegetg()directly to improve performance. - Implement the
getGoidByStack()method by invokehttp.http2curGoroutineID(). - Remove api
AllGoids()andForeachGoid().
- Source code https://github.com/timandy/routine/tree/v1.0.4
- Support copy
Cloneableobjects to sub goroutine when create sub goroutines byGo(),GoWait()andGoWaitResult()methods. - Add api
ForeachGoid(func(goid int64))to run a func for each goid.
- Support go version range
go1.13~go1.17(Not supportgo1.12anymore). - Use segment locks to reduce competition and improve
ThreadLocal'sread,writeandgcperformance. - Get all goids through
runtime.allgsinstead ofruntime.atomicAllG, sogo1.13~go1.15can also get all goids natively.
- Source code https://github.com/timandy/routine/tree/v1.0.3
- Fix bug in
getAllGoidByStack()method, Buffer may too small when dump all stack info.
- Support initialize value when first get from
ThreadLocal. - Add
StackErrorto catch stack info. - Add
Featureto wait goroutine finished or get result from goroutine. - Add api
NewThreadLocalWithInitial(),NewInheritableThreadLocal()andNewInheritableThreadLocalWithInitial(). - Support Inherit values of
ThreadLocalbyGo,GoWait()andGoWaitResult().
- Rename
LocalStoragetoThreadLocal. - Remove api
Clear(),InheritContext()andRestoreContext(). - Improve
gcperformance by reducing the number of for loops.
- Source code https://github.com/timandy/routine/tree/v1.0.2
- Improve performance by use slice to store goroutine local values.
- Optimize
clearDeadStore()method.
- Source code https://github.com/timandy/routine/tree/v1.0.1
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.
- Fix
NewLocalStorage()always return the same value, so we can define multiLocalStorageinstances. - Fix
NewLocalStorage()clear otherLocalStorage's value. - Fix
RestoreContext()not clear values when restore from empty*ImmutableContext.
- Not force create
storewhen invokeGet(),Remove(),Clear(),BackupContext()methods to reduce memory usage.
- Rename
InheritContext()toRestoreContext(). - Rename
Del()toRemove(). - Move Clear() method to
routinepackage.
- Source code https://github.com/timandy/routine/tree/v1.0.0
- Support go version range
go1.12~go1.17(New supportgo1.17). - Enable GitHub actions for continuous integration.
NewLocalStorage()always return the same value.
- Source code https://github.com/timandy/routine/tree/v0.0.2
- Support go version range
go1.12~go1.16. - Support
Goid()to get current goroutine id. - Support
AllGoidsto get all goroutine ids. - Support
ThreadLocalto save values ingo to goroutine.
NewLocalStorage()always return the same value.
- Source code https://github.com/timandy/routine/tree/v0.0.1