Skip to content

Commit 63a453c

Browse files
committed
Fixed a data race.
1 parent 336bc83 commit 63a453c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/GtmExtension/GtmListener.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,12 @@ private void Update(string path, bool force = false, [CallerMemberName] string c
260260
#endif
261261
Task.Run(async () =>
262262
{
263-
// This will run in background thread.
264-
status = ExecuteForOutput(gtmExe, $"record --status \"{path}\"");
263+
// This will run in a background thread.
264+
var result = ExecuteForOutput(gtmExe, $"record --status \"{path}\"");
265265

266266
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
267267

268-
if (!string.IsNullOrWhiteSpace(status))
268+
if (!string.IsNullOrWhiteSpace(status = result))
269269
{
270270
AppendToWindowTitle($"[GTM: {status}]");
271271
}

src/GtmExtension/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="GtmExtension.78062a42-0a99-47d0-a6e2-200a84959b52" Version="1.2" Language="en-US" Publisher="Jan Joneš" />
4+
<Identity Id="GtmExtension.78062a42-0a99-47d0-a6e2-200a84959b52" Version="1.3" Language="en-US" Publisher="Jan Joneš" />
55
<DisplayName>GtmExtension</DisplayName>
66
<Description>Empty VSIX Project.</Description>
77
</Metadata>

0 commit comments

Comments
 (0)