Skip to content

fix: prevent panic by closing channel in NewSourceTube goroutine - #156

Merged
RobertIndie merged 24 commits into
FunctionStream:mainfrom
wyyolo:Fix
Mar 12, 2024
Merged

fix: prevent panic by closing channel in NewSourceTube goroutine#156
RobertIndie merged 24 commits into
FunctionStream:mainfrom
wyyolo:Fix

Conversation

@wyyolo

@wyyolo wyyolo commented Mar 3, 2024

Copy link
Copy Markdown
Contributor

This PR resolves #150
Add unit test for NewSourceTube and NewSinkTube.

@wyyolo

wyyolo commented Mar 4, 2024

Copy link
Copy Markdown
Contributor Author

16878cf: "DATA RACE" was found in TestNewSinkTube, so I added mutex to this commit(0a7988e) to protect resource access.

Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
Comment thread fs/contube/memory_test.go Outdated
@RobertIndie RobertIndie changed the title fix : Closing the "result" within the goroutine of NewSinkTube may potentially cause a panic. Mar 12, 2024
@RobertIndie RobertIndie changed the title fix : closing the channel within the goroutine of NewSourceTube may cause a panic. Mar 12, 2024
@RobertIndie
RobertIndie merged commit ac28d4a into FunctionStream:main Mar 12, 2024
@wyyolo
wyyolo deleted the Fix branch March 12, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants