improve garbage collection of stream

This removes the Iterate method of the streamsMap, and moves the garbage
collection of closed streams from the session to the streamsMap.
This commit is contained in:
Marten Seemann
2017-10-03 04:04:21 +08:00
parent 474b036474
commit 709eec55b5
6 changed files with 161 additions and 250 deletions

View File

@@ -37,7 +37,7 @@ var _ = Describe("Stream Framer", func() {
stream1 = &stream{streamID: id1}
stream2 = &stream{streamID: id2}
streamsMap = newStreamsMap(nil, protocol.PerspectiveServer, nil)
streamsMap = newStreamsMap(nil, nil, protocol.PerspectiveServer, nil)
streamsMap.putStream(stream1)
streamsMap.putStream(stream2)