{"push_id":700181014,"size":1,"distinct_size":1,"ref":"refs/heads/patch-1","head":"063b1cc4e931b16bbbe179a2052efc1e84bec109","before":"646bcd7b284bf1b3f5659cb3392316154c084b68","commits":[{"sha":"063b1cc4e931b16bbbe179a2052efc1e84bec109","author":{"email":"3d8a910543a0b140a6eed61f03bcb0d8d09b920c@gmail.com","name":"James-Ko"},"message":"Don't deadlock with SyncStream\n\nThe following scenario will cause a deadlock in the old API because `Stream.Synchronized()` locks on the underlying Stream:\r\n\r\n    Stream stream = MakeAStream(); // i.e. Stream.Null\r\n    Stream synchronizedStream = Stream.Synchronized(stream);\r\n    lock (stream)\r\n    {\r\n        var thread = new Thread(() =>\r\n        {\r\n            long length = synchronizedStream.Length; // deadlock here because synchronizedStream internally locks on stream\r\n        });\r\n    \r\n        thread.Start();\r\n        thread.Join();\r\n    }\r\n\r\nTo fix this, the `SyncStream` class that `Stream.Synchronized()` returns  has been made to lock on a NonSerialized object instead of the Stream itself.","distinct":true,"url":"https://api.github.com/repos/James-Ko/coreclr/commits/063b1cc4e931b16bbbe179a2052efc1e84bec109"}]}