Skip to content

smallnest/exp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.