Coder Social home page Coder Social logo

go-events's Introduction

go-events's People

Contributors

kataras avatar m1k1o avatar plorenz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-events's Issues

Emit reads eventlisteners in a non-thread-safe way

Even though AddListener protects the map on write, Emit does not protect it on read. This can result in panics, as seen below:

fatal error: concurrent map read and map write

goroutine 2929 [running]:
runtime.throw(0xf7c620, 0x21)
        /home/plorenz/.gvm/gos/go1.14.7/src/runtime/panic.go:1116 +0x72 fp=0xc001757c60 sp=0xc001757c30 pc=0x438c82
runtime.mapaccess1_faststr(0xe453a0, 0xc0003aa360, 0xf6d2b3, 0x13, 0x10)
        /home/plorenz/.gvm/gos/go1.14.7/src/runtime/map_faststr.go:21 +0x43c fp=0xc001757cd0 sp=0xc001757c60 pc=0x41717c
github.com/kataras/go-events.(*emmiter).Emit(0xc0003ddc60, 0xf6d2b3, 0x13, 0xc00174a260, 0x1, 0x1)
        /home/plorenz/work/nf/build/pkg/mod/github.com/kataras/[email protected]/events.go:148 +0x5c fp=0xc001757d20 sp=0xc001757cd0 pc=0xaba60c
github.com/openziti/edge/gateway/internal/fabric.(*StateManagerImpl).AddSession(0xc000136360, 0xc0015c1480)
        /home/plorenz/work/nf/build/pkg/mod/github.com/openziti/[email protected]/gateway/internal/fabric/manager.go:149 +0x3ad fp=0xc001757e50 sp=0xc001757d20 pc=0xd0604d
github.com/openziti/edge/gateway/handler_edge_ctrl.(*sessionAddedHandler).HandleReceive.func1(0xc0019404b0, 0xc0003b01e0)
        /home/plorenz/work/nf/build/pkg/mod/github.com/openziti/[email protected]/gateway/handler_edge_ctrl/sessionAdded.go:48 +0x1af fp=0xc001757fd0 sp=0xc001757e50 pc=0xd0bbff
runtime.goexit()
        /home/plorenz/.gvm/gos/go1.14.7/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc001757fd8 sp=0xc001757fd0 pc=0x4699f1
created by github.com/openziti/edge/gateway/handler_edge_ctrl.(*sessionAddedHandler).HandleReceive
        /home/plorenz/work/nf/build/pkg/mod/github.com/openziti/[email protected]/gateway/handler_edge_ctrl/sessionAdded.go:43 +0x49

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.