Skip to content

replace HashMap with ConcurrentHashMap and use byte[]#4

Open
elijah-wright wants to merge 1 commit intoIRS-Public:mainfrom
elijah-wright:memory-concurrency
Open

replace HashMap with ConcurrentHashMap and use byte[]#4
elijah-wright wants to merge 1 commit intoIRS-Public:mainfrom
elijah-wright:memory-concurrency

Conversation

@elijah-wright
Copy link

this PR uses ConcurrentHashMap instead of HashMap and removes the stream logic in read() in MemoryIOLocation. the synchronized block locks the object, meaning that multiple threads can't access the hash map. InputStream is stateful, so I changed the read() function to directly get what is in the hash map

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

Successfully merging this pull request may close these issues.

1 participant