Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: concurrent map read and map write #64

Closed
gotang opened this issue Aug 20, 2016 · 1 comment
Closed

fatal error: concurrent map read and map write #64

gotang opened this issue Aug 20, 2016 · 1 comment

Comments

@gotang
Copy link
Contributor

gotang commented Aug 20, 2016

call "Watch" method for a DigitalPin while another DigitalPin get an interrupt will cause "fatal error: concurrent map read and map write" error , beacause one write map (interruptablePins) and anthoer read this map.

Log:
`fatal error: concurrent map read and map write

goroutine 18 [running]:
runtime.throw(0x233cf7, 0x21)
Go/src/runtime/panic.go:566 +0x78 fp=0x10618364 sp=0x10618358
runtime.mapaccess2_fast32(0x203100, 0x106c9880, 0xa, 0x40, 0xffffffff)
Go/src/runtime/hashmap_fast.go:66 +0x5c fp=0x10618374 sp=0x10618364
github.com/kidoman/embd/host/generic.initEpollListener.func1(0x106e59b0)
/src/github.com/kidoman/embd/host/generic/interrupt.go:65 +0x1b0 fp=0x106187d4 sp=0x10618374
runtime.goexit()
Go/src/runtime/asm_arm.s:998 +0x4 fp=0x106187d4 sp=0x106187d4
created by github.com/kidoman/embd/host/generic.initEpollListener
src/github.com/kidoman/embd/host/generic/interrupt.go:70 +0x194`

can you add an mutex here, thx.

@gotang gotang closed this as completed Aug 20, 2016
@tve
Copy link
Contributor

tve commented Aug 27, 2016

why did you close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants