An error occurred while fetching the assigned milestone of the selected merge_request.
catfile: Introduce request queues to allow batching reads
1 unresolved thread
1 unresolved thread
Compare changes
- Patrick Steinhardt authored
Same as with the preceding commit, the object reaches into the parent to determine whether the object reade is closed or not. This comlicates locking and is unclean design-wise given that concerns of the child should be disentangled from its parent. Fix this design issue by keeping track of the closed status in object reader and object separately. This allows us to now remove the reference to the parent reader completely.
@@ -84,8 +84,10 @@ func (o *objectReader) close() {
@@ -115,12 +117,17 @@ func (o *objectReader) Object(
@@ -142,7 +149,6 @@ func (o *objectReader) Object(
@@ -157,8 +163,6 @@ func (o *objectReader) Object(
@@ -170,6 +174,9 @@ type Object struct {
@@ -178,8 +185,16 @@ func (o *Object) isDirty() bool {
@@ -195,7 +210,7 @@ func (o *Object) Read(p []byte) (int, error) {