GithubHelp home page GithubHelp logo

exp's Introduction

exp

GitHub GitHub Action Go Report Card GoDoc

Experimental packages not in std and golang.org/exp

packages

  • sync

    • generic sync.Map: modify sync.Map to support generic
    • Phaser: a reusable synchronization barrier, similar in functionality to java.util.concurrent.Phaser
    • Notifier: implement the observer pattern via channel
    • Shard: a sharding data structure with lock-free read and write
    • Exchanger: a synchronization point at which goroutines can pair and swap elements within pairs. Each goroutine presents some object on entry to the exchange method, matches with a partner goroutine, and receives its partner's object on return. An Exchanger may be viewed as a bidirectional form of a channel.
    • atomicx: add C++ 20 atomic wait/notify feature for go std atomic
      • Pointer[T]
      • Value
      • Uintptr
      • Bool
      • Int32
      • Int64
      • Uint32
      • Uint64
    • Pool: a generic pool, forked from https://github.com/mkmik/syncpool
  • container

    • heap: generic heap
    • binheap: human friendly generic heap
    • list: generic list
    • ring: generic ring
    • skiplist: generic skiplist based on mauricegit/skiplist
    • set: discussion at golang/go#47331
      • Set: generic set
      • SortedSet: generic sorted set
    • maps:
      • OrderedMap: an insert-order map. The main code is forked wk8/go-ordered-map
      • AccessOrderedMap: an access-order map.
      • BidiMap: a bidirectional map.
    • Tuple: a collection of generic tuples.
  • chanx

    • Batch: batch get from channels efficiently
  • io

    • MmapReader: a mmap reader which implements io.Reader, io.ReadAt, io.Closer and can ReadLine
  • db

    • Rows and Row provides two helper functions to query structs from databases.
    • RowsMap and RowMap provides two helper functions to query map from databases.

exp's People

Contributors

smallnest avatar

Stargazers

insects avatar Anthony Bowyer-Lowe avatar Weimin Kong avatar 像树一样成长! avatar  avatar  avatar Liu avatar bingoohuang avatar cuisongliu avatar Marco Marinò avatar Ron Cohen avatar mcn avatar  avatar  avatar whoops avatar jiaxin avatar Fufu avatar woongnaroo avatar Jia avatar  avatar Awezome avatar  avatar jmgao avatar  avatar  avatar  avatar Marcin Maluszczak avatar Lam Tran avatar  avatar Peng Peidong avatar  avatar tsingson avatar jincurry avatar Zhoukun Cheng avatar  avatar 虫子樱桃 avatar 宝宝巴士 avatar  avatar Du, Chengbin avatar Khanh Pham avatar liuwei avatar  avatar Aleksandr Zelenin avatar Pink White avatar xiangxudong avatar  avatar  avatar Mr.Zhao avatar luckypeak avatar EnanZhou avatar Deepak Mohandas avatar banshan avatar Kabochar avatar Song Liu avatar lesismal avatar Milos Colakovic avatar  avatar Tanmoy Sen Gupta avatar Mihai Todor avatar JeffreyBool avatar zbv avatar Bogdan Dinu avatar

Watchers

 avatar  avatar

exp's Issues

Conversion from unsafe.Pointer to *V violates unsafe package rules

return e.p.CompareAndSwap((*V)(expunged), nil)

if e.p.CompareAndSwap(nil, (*V)(expunged)) {

I got curious about this approach and talked with Go devs and community - is it safe to do so? Their answer was no - it's not. Go compiler makes no promises about not following pointer value and exploring contents in the runtime.

Per docs:

(1) Conversion of a *T1 to Pointer to *T2.

Provided that T2 is no larger than T1 and that the two share an equivalent memory layout, this conversion allows reinterpreting data of one type as data of another type. An example is the implementation of math.Float64bits:

So you can't do this technically. What you can do is use plain unsafe.Pointer instead of atomic.Pointer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.