Releases: timandy/routine
Releases · timandy/routine
Version 1.0.4
Release notes
Features
- Add zero-copy conversion method between
bytes
andstring
, seebytesconv.Bytes()
andbytesconv.String()
methods.
Changes
- Modify the garbage collection mechanism, remove
gcTimer
, no longer perform garbage collection through timers. - Store the context in the
g.labels
field of the coroutine structure which will be set tonil
after coroutine ends. The context data will be collected at the nextGC
. - Use
go:linkname
to invoke assembly codegetg()
directly to improve performance. - Implement the
getGoidByStack()
method by invokehttp.http2curGoroutineID()
. - Remove api
AllGoids()
andForeachGoid()
.
Links
- Source code https://github.com/timandy/routine/tree/v1.0.4
Version 1.0.3
Release notes
Features
- Support copy
Cloneable
objects to sub goroutine when create sub goroutines byGo()
,GoWait()
andGoWaitResult()
methods. - Add api
ForeachGoid(func(goid int64))
to run a func for each goid.
Changes
- Support go version range
go1.13
~go1.17
(Not supportgo1.12
anymore). - Use segment locks to reduce competition and improve
ThreadLocal
'sread
,write
andgc
performance. - Get all goids through
runtime.allgs
instead ofruntime.atomicAllG
, sogo1.13
~go1.15
can also get all goids natively.
Links
- Source code https://github.com/timandy/routine/tree/v1.0.3
Version 1.0.2
Release notes
Bugs
- Fix bug in
getAllGoidByStack()
method, Buffer may too small when dump all stack info.
Features
- Support initialize value when first get from
ThreadLocal
. - Add
StackError
to catch stack info. - Add
Feature
to wait goroutine finished or get result from goroutine. - Add api
NewThreadLocalWithInitial()
,NewInheritableThreadLocal()
andNewInheritableThreadLocalWithInitial()
. - Support Inherit values of
ThreadLocal
byGo
,GoWait()
andGoWaitResult()
.
Changes
- Rename
LocalStorage
toThreadLocal
. - Remove api
Clear()
,InheritContext()
andRestoreContext()
. - Improve
gc
performance by reducing the number of for loops.
Links
- Source code https://github.com/timandy/routine/tree/v1.0.2
Version 1.0.1
Release notes
Features
- Improve performance by use slice to store goroutine local values.
- Optimize
clearDeadStore()
method.
Links
- Source code https://github.com/timandy/routine/tree/v1.0.1
Version 1.0.0
Release notes
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.
Bugs
- Fix
NewLocalStorage()
always return the same value, so we can define multiLocalStorage
instances. - Fix
NewLocalStorage()
clear otherLocalStorage
's value. - Fix
RestoreContext()
not clear values when restore from empty*ImmutableContext
.
Features
- Not force create
store
when invokeGet()
,Remove()
,Clear()
,BackupContext()
methods to reduce memory usage.
Changes
- Rename
InheritContext()
toRestoreContext()
. - Rename
Del()
toRemove()
. - Move Clear() method to
routine
package.
Links
- Source code https://github.com/timandy/routine/tree/v1.0.0
Version 0.0.2
Release notes
Features
- Support go version range
go1.12
~go1.17
(New supportgo1.17
). - Enable GitHub actions for continuous integration.
Known Issues
NewLocalStorage()
always return the same value.
Links
- Source code https://github.com/timandy/routine/tree/v0.0.2
Version 0.0.1
Release notes
Features
- Support go version range
go1.12
~go1.16
. - Support
Goid()
to get current goroutine id. - Support
AllGoids
to get all goroutine ids. - Support
ThreadLocal
to save values ingo to goroutine.
Known Issues
NewLocalStorage()
always return the same value.
Links
- Source code https://github.com/timandy/routine/tree/v0.0.1