xruntime

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoID

func GoID(bystack ...bool) int64

获取当前的GoroutineID TODO: 应当尽早使用context概念替换GOID逻辑 共有三个版本获取GOID 1.stack: 通过堆栈信息获取 2.go-tls: go 1.17.*版本无法使用go-tls,参考https://github.com/huandu/go-tls,[20211125待修复] 3.getg: 通过汇编代码获取g结构体,再确定goid的offset,用offset获取goid,参考https://github.com/v2pro/plz 以上性能比为: 90:3:1

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL